- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 25 for enter (0.18 sec)
-
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) -
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) -
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) -
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) -
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) -
android/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 May 03 12:43:13 GMT 2024 - Last Modified: Mon Apr 17 14:48:57 GMT 2023 - 26.1K bytes - Viewed (0) -
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) -
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) -
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) -
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 Apr 12 12:43:09 GMT 2024 - Last Modified: Wed Sep 06 17:04:31 GMT 2023 - 4.9K bytes - Viewed (0)