Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 41 for enter (0.59 sec)

  1. android/guava-tests/test/com/google/common/util/concurrent/MonitorTestCase.java

      private String leave() {
        return "leave";
      }
    
      public final void testMutualExclusion() throws Exception {
        thread1.callAndAssertReturns(enter());
        thread2.callAndAssertBlocks(enter());
        thread1.callAndAssertReturns(leave());
        thread2.assertPriorCallReturns(enter());
      }
    
      public final void testTryEnter() throws Exception {
        thread1.callAndAssertReturns(true, tryEnter());
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Apr 26 20:07:17 GMT 2023
    - 7.9K bytes
    - Viewed (0)
  2. guava-tests/test/com/google/common/util/concurrent/MonitorTestCase.java

      private String leave() {
        return "leave";
      }
    
      public final void testMutualExclusion() throws Exception {
        thread1.callAndAssertReturns(enter());
        thread2.callAndAssertBlocks(enter());
        thread1.callAndAssertReturns(leave());
        thread2.assertPriorCallReturns(enter());
      }
    
      public final void testTryEnter() throws Exception {
        thread1.callAndAssertReturns(true, tryEnter());
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Wed Apr 26 20:07:17 GMT 2023
    - 8K bytes
    - Viewed (0)
  3. guava-tests/test/com/google/common/util/concurrent/GeneratedMonitorTest.java

       * methods that do not take an explicit timeout value, a single test case is generated only if the
       * implicit timeout of that method matches the given timeoutsToUse. For example, enter() is
       * treated like enter(MAX, MILLIS) and tryEnter() is treated like enter(0, MILLIS).
       */
      private static void addTests(
          TestSuite suite,
          Method method,
          Scenario scenario,
          TimeoutsToUse timeoutsToUse,
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Mon Apr 17 14:48:57 GMT 2023
    - 27.4K bytes
    - Viewed (0)
  4. android/guava/src/com/google/common/util/concurrent/Monitor.java

        this.lock = new ReentrantLock(fair);
      }
    
      /** Enters this monitor. Blocks indefinitely. */
      public void enter() {
        lock.lock();
      }
    
      /**
       * Enters this monitor. Blocks at most the given time.
       *
       * @return whether the monitor was entered
       */
      @SuppressWarnings("GoodTime") // should accept a java.time.Duration
      public boolean enter(long time, TimeUnit unit) {
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Dec 04 18:22:01 GMT 2023
    - 38.6K bytes
    - Viewed (0)
  5. maven-core/src/test/java/org/apache/maven/execution/scope/internal/MojoExecutionScopeTest.java

        @Test
        void testNestedEnter() throws Exception {
            MojoExecutionScope scope = new MojoExecutionScope();
    
            scope.enter();
    
            Object o1 = new Object();
            scope.seed(Object.class, o1);
            assertSame(o1, scope.scope(Key.get(Object.class), null).get());
    
            scope.enter();
            Object o2 = new Object();
            scope.seed(Object.class, o2);
    Java
    - Registered: Sun Apr 28 03:35:10 GMT 2024
    - Last Modified: Sat Apr 15 17:24:20 GMT 2023
    - 3.6K bytes
    - Viewed (0)
  6. guava-tests/benchmark/com/google/common/util/concurrent/MonitorBasedPriorityBlockingQueue.java

        final Monitor monitor = this.monitor;
        monitor.enter();
        try {
          return q.toArray(a);
        } finally {
          monitor.leave();
        }
      }
    
      @CanIgnoreReturnValue // pushed down from class to method
      @Override
      public String toString() {
        final Monitor monitor = this.monitor;
        monitor.enter();
        try {
          return q.toString();
        } finally {
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Apr 19 19:24:36 GMT 2023
    - 19.5K bytes
    - Viewed (0)
  7. guava-tests/benchmark/com/google/common/util/concurrent/MonitorBasedArrayBlockingQueue.java

       *
       * @return the number of elements in this queue
       */
      @CanIgnoreReturnValue
      @Override
      public int size() {
        final Monitor monitor = this.monitor;
        monitor.enter();
        try {
          return count;
        } finally {
          monitor.leave();
        }
      }
    
      // this doc comment is a modified copy of the inherited doc comment,
      // without the reference to unlimited queues.
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Apr 19 19:24:36 GMT 2023
    - 22.5K bytes
    - Viewed (0)
  8. android/guava-tests/benchmark/com/google/common/util/concurrent/MonitorBasedPriorityBlockingQueue.java

        final Monitor monitor = this.monitor;
        monitor.enter();
        try {
          return q.toArray(a);
        } finally {
          monitor.leave();
        }
      }
    
      @CanIgnoreReturnValue // pushed down from class to method
      @Override
      public String toString() {
        final Monitor monitor = this.monitor;
        monitor.enter();
        try {
          return q.toString();
        } finally {
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Apr 19 19:24:36 GMT 2023
    - 19.5K bytes
    - Viewed (0)
  9. android/guava-tests/test/com/google/common/util/concurrent/SupplementalMonitorTest.java

        verifyOccupiedMethodsInAnotherThread(monitor, false, false, 0);
        monitor.enter();
        try {
          verifyOccupiedMethodsInCurrentThread(monitor, true, true, 1);
          verifyOccupiedMethodsInAnotherThread(monitor, true, false, 0);
          monitor.enter();
          try {
            verifyOccupiedMethodsInCurrentThread(monitor, true, true, 2);
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 4.9K bytes
    - Viewed (0)
  10. android/guava-tests/benchmark/com/google/common/util/concurrent/MonitorBasedArrayBlockingQueue.java

       *
       * @return the number of elements in this queue
       */
      @CanIgnoreReturnValue
      @Override
      public int size() {
        final Monitor monitor = this.monitor;
        monitor.enter();
        try {
          return count;
        } finally {
          monitor.leave();
        }
      }
    
      // this doc comment is a modified copy of the inherited doc comment,
      // without the reference to unlimited queues.
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Apr 19 19:24:36 GMT 2023
    - 22.5K bytes
    - Viewed (0)
Back to top