Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for Semaphore (0.03 sec)

  1. guava/src/com/google/common/util/concurrent/Striped.java

      }
    
      /**
       * Creates a {@code Striped<Semaphore>} with eagerly initialized, strongly referenced semaphores,
       * with the specified number of permits.
       *
       * @param stripes the minimum number of stripes (semaphores) required
       * @param permits the number of permits in each semaphore
       * @return a new {@code Striped<Semaphore>}
       */
      public static Striped<Semaphore> semaphore(int stripes, int permits) {
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Sat Aug 09 01:14:59 UTC 2025
    - 20.6K bytes
    - Viewed (0)
  2. android/guava-tests/test/com/google/common/util/concurrent/UninterruptiblesTest.java

        assertInterrupted();
      }
    
      // Semaphore.tryAcquire() tests
      public void testTryAcquireWithNoWait() {
        Stopwatch stopwatch = Stopwatch.createStarted();
        Semaphore semaphore = new Semaphore(99);
        assertTrue(tryAcquireUninterruptibly(semaphore, 0, MILLISECONDS));
        assertTrue(tryAcquireUninterruptibly(semaphore, -42, MILLISECONDS));
        assertTrue(tryAcquireUninterruptibly(semaphore, LONG_DELAY_MS, MILLISECONDS));
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Wed Jul 16 17:42:14 UTC 2025
    - 31.7K bytes
    - Viewed (0)
  3. android/guava/src/com/google/common/util/concurrent/Uninterruptibles.java

      public static boolean tryAcquireUninterruptibly(Semaphore semaphore, Duration timeout) {
        return tryAcquireUninterruptibly(semaphore, toNanosSaturated(timeout), TimeUnit.NANOSECONDS);
      }
    
      /**
       * Invokes {@code semaphore.}{@link Semaphore#tryAcquire(int, long, TimeUnit) tryAcquire(1,
       * timeout, unit)} uninterruptibly.
       *
       * @since 18.0
       */
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Aug 07 16:05:33 UTC 2025
    - 19.8K bytes
    - Viewed (0)
Back to top