Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for newGuard (0.04 sec)

  1. 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;
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Mon Mar 17 20:26:29 UTC 2025
    - 42.8K bytes
    - Viewed (0)
Back to top