- Sort Score
- Num 10 results
- Language All
Results 1 - 6 of 6 for enterWhen (0.54 seconds)
-
guava-tests/test/com/google/common/util/concurrent/MonitorTestCase.java
TestGuard guard = new TestGuard(true); thread1.callAndAssertReturns(enterWhen(), guard); // same as above but with the new syntax thread1.callAndAssertReturns(enterWhen(), monitor.newGuard(() -> true)); } public final void testEnterWhen_initiallyFalse() throws Exception { TestGuard guard = new TestGuard(false); thread1.callAndAssertWaits(enterWhen(), guard); monitor.enter(); guard.setSatisfied(true);
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Sat Mar 07 02:20:33 GMT 2026 - 8.2K bytes - Click Count (0) -
android/guava-tests/test/com/google/common/util/concurrent/MonitorTestCase.java
thread1.callAndAssertReturns(enterWhen(), guard); } public final void testEnterWhen_initiallyFalse() throws Exception { TestGuard guard = new TestGuard(false); thread1.callAndAssertWaits(enterWhen(), guard); monitor.enter(); guard.setSatisfied(true); monitor.leave(); thread1.assertPriorCallReturns(enterWhen()); }
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Sat Mar 07 02:20:33 GMT 2026 - 8.1K bytes - Click Count (0) -
android/guava/src/com/google/common/util/concurrent/Monitor.java
* * public V get() throws InterruptedException { * monitor.enterWhen(valuePresent); * try { * V result = value; * value = null; * return result; * } finally { * monitor.leave(); * } * } * * public void set(V newValue) throws InterruptedException { * monitor.enterWhen(valueAbsent); * try { * value = newValue; * } finally {
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Wed Jan 28 22:39:02 GMT 2026 - 43.5K bytes - Click Count (0) -
guava-tests/benchmark/com/google/common/util/concurrent/MonitorBasedArrayBlockingQueue.java
Monitor monitor = this.monitor; if (monitor.enterWhen(notEmpty, timeout, unit)) { try { return extract(); } finally { monitor.leave(); } } else { return null; } } @CanIgnoreReturnValue @Override public E take() throws InterruptedException { Monitor monitor = this.monitor; monitor.enterWhen(notEmpty); try { return extract();Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Mon Mar 23 21:06:42 GMT 2026 - 22.4K bytes - Click Count (0) -
android/guava-tests/benchmark/com/google/common/util/concurrent/MonitorBasedArrayBlockingQueue.java
Monitor monitor = this.monitor; if (monitor.enterWhen(notEmpty, timeout, unit)) { try { return extract(); } finally { monitor.leave(); } } else { return null; } } @CanIgnoreReturnValue @Override public E take() throws InterruptedException { Monitor monitor = this.monitor; monitor.enterWhen(notEmpty); try { return extract();Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Mon Mar 23 21:06:42 GMT 2026 - 22.4K bytes - Click Count (0) -
guava-tests/benchmark/com/google/common/util/concurrent/MonitorBasedPriorityBlockingQueue.java
} @CanIgnoreReturnValue // pushed down from class to method @Override public @Nullable E poll(long timeout, TimeUnit unit) throws InterruptedException { Monitor monitor = this.monitor; if (monitor.enterWhen(notEmpty, timeout, unit)) { try { return q.poll(); } finally { monitor.leave(); } } else { return null; } }
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Mon Mar 23 21:06:42 GMT 2026 - 19K bytes - Click Count (0)