- Sort Score
- Result 10 results
- Languages All
Results 1 - 2 of 2 for tryEnter (0.03 sec)
-
android/guava-tests/test/com/google/common/util/concurrent/GeneratedMonitorTest.java
return method.getName().startsWith("enter") || method.getName().startsWith("tryEnter"); } /** Identifies just tryEnterXxx methods (a subset of {@link #isAnyEnter}), which never block. */ private static boolean isTryEnter(Method method) { return method.getName().startsWith("tryEnter"); } /**
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Mon Aug 11 19:31:30 UTC 2025 - 27K bytes - Viewed (0) -
guava/src/com/google/common/util/concurrent/Monitor.java
* as the condition of an <i>if</i> statement containing a <i>try/finally</i> block to ensure that * the current thread leaves the monitor cleanly: * * {@snippet : * if (monitor.tryEnter()) { * try { * // do things while occupying the monitor * } finally { * monitor.leave(); * } * } else { * // do other things since the monitor was not available * } * } *
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Mon Mar 17 20:26:29 UTC 2025 - 42.8K bytes - Viewed (0)