- Sort Score
- Result 10 results
- Languages All
Results 1 - 9 of 9 for semaphore (0.58 sec)
-
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));
Java - Registered: Fri May 03 12:43:13 GMT 2024 - Last Modified: Wed Feb 09 22:57:07 GMT 2022 - 30.9K bytes - Viewed (0) -
android/guava/src/com/google/common/util/concurrent/Uninterruptibles.java
} /** * Invokes {@code semaphore.}{@link Semaphore#tryAcquire(int, long, TimeUnit) tryAcquire(permits, * timeout, unit)} uninterruptibly. * * @since 18.0 */ @J2ktIncompatible @GwtIncompatible // concurrency @SuppressWarnings("GoodTime") // should accept a java.time.Duration public static boolean tryAcquireUninterruptibly(
Java - Registered: Fri Apr 26 12:43:10 GMT 2024 - Last Modified: Tue Apr 04 09:45:04 GMT 2023 - 14.4K bytes - Viewed (0) -
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));
Java - Registered: Fri Apr 12 12:43:09 GMT 2024 - Last Modified: Wed Feb 09 22:57:07 GMT 2022 - 31.7K bytes - Viewed (0) -
android/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) {
Java - Registered: Fri Apr 26 12:43:10 GMT 2024 - Last Modified: Mon Apr 10 20:55:18 GMT 2023 - 20.3K bytes - Viewed (1) -
android/guava-tests/test/com/google/common/base/FinalizableReferenceQueueClassLoaderUnloadingTest.java
} } public static class FrqUser implements Callable<WeakReference<Object>> { public static FinalizableReferenceQueue frq = new FinalizableReferenceQueue(); public static final Semaphore finalized = new Semaphore(0); @Override public WeakReference<Object> call() { WeakReference<Object> wr = new FinalizableWeakReference<Object>(new Integer(23), frq) { @Override
Java - Registered: Fri May 03 12:43:13 GMT 2024 - Last Modified: Tue Feb 16 03:24:50 GMT 2021 - 13.3K bytes - Viewed (0) -
guava-tests/test/com/google/common/base/FinalizableReferenceQueueClassLoaderUnloadingTest.java
} } public static class FrqUser implements Callable<WeakReference<Object>> { public static FinalizableReferenceQueue frq = new FinalizableReferenceQueue(); public static final Semaphore finalized = new Semaphore(0); @Override public WeakReference<Object> call() { WeakReference<Object> wr = new FinalizableWeakReference<Object>(new Integer(23), frq) { @Override
Java - Registered: Fri Apr 19 12:43:09 GMT 2024 - Last Modified: Tue Feb 16 03:24:50 GMT 2021 - 13.3K bytes - Viewed (0) -
guava-tests/test/com/google/common/util/concurrent/JSR166TestCase.java
try { assertTrue(latch.await(LONG_DELAY_MS, MILLISECONDS)); } catch (Throwable t) { threadUnexpectedException(t); } } public void await(Semaphore semaphore) { try { assertTrue(semaphore.tryAcquire(LONG_DELAY_MS, MILLISECONDS)); } catch (Throwable t) { threadUnexpectedException(t); } } // /**
Java - Registered: Fri Apr 12 12:43:09 GMT 2024 - Last Modified: Thu Feb 22 17:15:24 GMT 2024 - 37.7K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/util/concurrent/JSR166TestCase.java
try { assertTrue(latch.await(LONG_DELAY_MS, MILLISECONDS)); } catch (Throwable t) { threadUnexpectedException(t); } } public void await(Semaphore semaphore) { try { assertTrue(semaphore.tryAcquire(LONG_DELAY_MS, MILLISECONDS)); } catch (Throwable t) { threadUnexpectedException(t); } } // /**
Java - Registered: Fri May 03 12:43:13 GMT 2024 - Last Modified: Thu Feb 22 17:15:24 GMT 2024 - 37.2K bytes - Viewed (0) -
android/guava/src/com/google/common/util/concurrent/RateLimiter.java
* * <p>Rate limiters are often used to restrict the rate at which some physical or logical resource * is accessed. This is in contrast to {@link java.util.concurrent.Semaphore} which restricts the * number of concurrent accesses instead of the rate (note though that concurrency and rate are * closely related, e.g. see <a href="http://en.wikipedia.org/wiki/Little%27s_law">Little's * Law</a>). *
Java - Registered: Fri Apr 26 12:43:10 GMT 2024 - Last Modified: Tue Apr 04 09:45:04 GMT 2023 - 18.2K bytes - Viewed (0)