Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 6 of 6 for tryEnter (0.12 sec)

  1. guava-tests/test/com/google/common/util/concurrent/MonitorTestCase.java

        thread1.callAndAssertReturns(true, tryEnter());
        thread2.callAndAssertReturns(false, tryEnter());
        thread1.callAndAssertReturns(true, tryEnter());
        thread2.callAndAssertReturns(false, tryEnter());
        thread1.callAndAssertReturns(leave());
        thread2.callAndAssertReturns(false, tryEnter());
        thread1.callAndAssertReturns(leave());
        thread2.callAndAssertReturns(true, tryEnter());
      }
    
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Wed Apr 26 20:07:17 UTC 2023
    - 8K bytes
    - Viewed (0)
  2. android/guava-tests/test/com/google/common/util/concurrent/MonitorTestCase.java

        thread1.callAndAssertReturns(true, tryEnter());
        thread2.callAndAssertReturns(false, tryEnter());
        thread1.callAndAssertReturns(true, tryEnter());
        thread2.callAndAssertReturns(false, tryEnter());
        thread1.callAndAssertReturns(leave());
        thread2.callAndAssertReturns(false, tryEnter());
        thread1.callAndAssertReturns(leave());
        thread2.callAndAssertReturns(true, tryEnter());
      }
    
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Wed Apr 26 20:07:17 UTC 2023
    - 7.9K bytes
    - Viewed (0)
  3. 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: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Wed May 29 16:29:37 UTC 2024
    - 25.8K bytes
    - Viewed (0)
  4. 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: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Wed May 29 16:29:37 UTC 2024
    - 27.1K bytes
    - Viewed (0)
  5. android/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:
     *
     * <pre>{@code
     * if (monitor.tryEnter()) {
     *   try {
     *     // do things while occupying the monitor
     *   } finally {
     *     monitor.leave();
     *   }
     * } else {
     *   // do other things since the monitor was not available
     * }
     * }</pre>
     *
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Mon Dec 04 18:22:01 UTC 2023
    - 38.6K bytes
    - Viewed (0)
  6. 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:
     *
     * <pre>{@code
     * if (monitor.tryEnter()) {
     *   try {
     *     // do things while occupying the monitor
     *   } finally {
     *     monitor.leave();
     *   }
     * } else {
     *   // do other things since the monitor was not available
     * }
     * }</pre>
     *
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Mon Dec 04 18:22:01 UTC 2023
    - 42.5K bytes
    - Viewed (0)
Back to top