- Sort Score
- Num 10 results
- Language All
Results 1 - 2 of 2 for newGuard (0.03 seconds)
-
android/guava/src/com/google/common/util/concurrent/Monitor.java
* {@snippet : * public class SafeBox<V> { * private V value; * private final Monitor monitor = new Monitor(); * private final Monitor.Guard valuePresent = monitor.newGuard(() -> value != null); * private final Monitor.Guard valueAbsent = monitor.newGuard(() -> value == null); * * public V get() throws InterruptedException { * monitor.enterWhen(valuePresent); * try { * V result = value;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/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();
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)