Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 228 for leave (0.2 sec)

  1. android/guava-tests/benchmark/com/google/common/util/concurrent/MonitorBasedPriorityBlockingQueue.java

          } finally {
            monitor.leave();
          }
        } else {
          return null;
        }
      }
    
      @CanIgnoreReturnValue // pushed down from class to method
      @Override
      public E take() throws InterruptedException {
        final Monitor monitor = this.monitor;
        monitor.enterWhen(notEmpty);
        try {
          return q.poll();
        } finally {
          monitor.leave();
        }
      }
    
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Apr 19 19:24:36 GMT 2023
    - 19.5K bytes
    - Viewed (0)
  2. android/guava-tests/benchmark/com/google/common/util/concurrent/MonitorBasedArrayBlockingQueue.java

        try {
          insert(e);
        } finally {
          monitor.leave();
        }
      }
    
      @CanIgnoreReturnValue
      @Override
      public @Nullable E poll() {
        final Monitor monitor = this.monitor;
        if (monitor.enterIf(notEmpty)) {
          try {
            return extract();
          } finally {
            monitor.leave();
          }
        } else {
          return null;
        }
      }
    
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Apr 19 19:24:36 GMT 2023
    - 22.5K bytes
    - Viewed (0)
  3. android/guava-tests/test/com/google/common/util/concurrent/MonitorTestCase.java

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

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

        try {
          insert(e);
        } finally {
          monitor.leave();
        }
      }
    
      @CanIgnoreReturnValue
      @Override
      public @Nullable E poll() {
        final Monitor monitor = this.monitor;
        if (monitor.enterIf(notEmpty)) {
          try {
            return extract();
          } finally {
            monitor.leave();
          }
        } else {
          return null;
        }
      }
    
    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)
  6. android/guava/src/com/google/common/util/concurrent/AbstractService.java

            notifyFailed(shutdownFailure);
          } finally {
            monitor.leave();
            dispatchListenerEvents();
          }
        }
        return this;
      }
    
      @Override
      public final void awaitRunning() {
        monitor.enterWhenUninterruptibly(hasReachedRunning);
        try {
          checkCurrentState(RUNNING);
        } finally {
          monitor.leave();
        }
      }
    
      @Override
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Fri May 12 18:32:03 GMT 2023
    - 20.4K bytes
    - Viewed (0)
  7. guava-tests/benchmark/com/google/common/util/concurrent/MonitorBasedPriorityBlockingQueue.java

          } finally {
            monitor.leave();
          }
        } else {
          return null;
        }
      }
    
      @CanIgnoreReturnValue // pushed down from class to method
      @Override
      public E take() throws InterruptedException {
        final Monitor monitor = this.monitor;
        monitor.enterWhen(notEmpty);
        try {
          return q.poll();
        } finally {
          monitor.leave();
        }
      }
    
    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)
  8. android/guava/src/com/google/common/util/concurrent/Monitor.java

      //
      // 2. Since you can enter the monitor without a guard at all, some
      //    places you'll have monitor.enter()/monitor.leave() and other
      //    places you'll have guard.enter()/guard.leave() even though
      //    it's the same lock being acquired underneath. Always using
      //    monitor.enterXXX()/monitor.leave() will make it really clear
      //    which lock is held at any point in the code.
      //
    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)
  9. android/guava-tests/test/com/google/common/util/concurrent/GeneratedMonitorTest.java

        } else {
          assertNull(task.get(UNEXPECTED_HANG_DELAY_MILLIS, TimeUnit.MILLISECONDS));
        }
      }
    
      @Override
      protected void tearDown() throws Exception {
        // We don't want to leave stray threads running after each test. At this point, every thread
        // launched by this test is either:
        //
        // (a) Blocked attempting to enter the monitor.
        // (b) Waiting for the single guard to become satisfied.
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Apr 17 14:48:57 GMT 2023
    - 26.1K bytes
    - Viewed (0)
  10. android/guava-tests/test/com/google/common/util/concurrent/SupplementalMonitorTest.java

            verifyOccupiedMethodsInAnotherThread(monitor, true, false, 0);
          } finally {
            monitor.leave();
          }
          verifyOccupiedMethodsInCurrentThread(monitor, true, true, 1);
          verifyOccupiedMethodsInAnotherThread(monitor, true, false, 0);
        } finally {
          monitor.leave();
        }
        verifyOccupiedMethodsInCurrentThread(monitor, false, false, 0);
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 4.9K bytes
    - Viewed (0)
Back to top