- Sort Score
- Result 10 results
- Languages All
Results 1 - 9 of 9 for tryAcquire (0.21 sec)
-
android/guava-tests/test/com/google/common/util/concurrent/RateLimiterTest.java
assertTrue(limiter.tryAcquire(0, SECONDS)); assertFalse(limiter.tryAcquire(0, SECONDS)); assertFalse(limiter.tryAcquire(0, SECONDS)); stopwatch.sleepMillis(100); assertFalse(limiter.tryAcquire(0, SECONDS)); } public void testTryAcquire_someWaitAllowed() { RateLimiter limiter = RateLimiter.create(5.0, stopwatch); assertTrue(limiter.tryAcquire(0, SECONDS));
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Mon Oct 21 14:28:19 UTC 2024 - 21.8K bytes - Viewed (0) -
guava-tests/test/com/google/common/util/concurrent/RateLimiterTest.java
assertTrue(limiter.tryAcquire(0, SECONDS)); assertFalse(limiter.tryAcquire(0, SECONDS)); assertFalse(limiter.tryAcquire(0, SECONDS)); stopwatch.sleepMillis(100); assertFalse(limiter.tryAcquire(0, SECONDS)); } public void testTryAcquire_someWaitAllowed() { RateLimiter limiter = RateLimiter.create(5.0, stopwatch); assertTrue(limiter.tryAcquire(0, SECONDS));
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Mon Oct 21 14:28:19 UTC 2024 - 21.8K bytes - Viewed (0) -
guava/src/com/google/common/util/concurrent/RateLimiter.java
*/ @SuppressWarnings("GoodTime") // should accept a java.time.Duration public boolean tryAcquire(long timeout, TimeUnit unit) { return tryAcquire(1, timeout, unit); } /** * Acquires permits from this {@link RateLimiter} if it can be acquired immediately without delay. * * <p>This method is equivalent to {@code tryAcquire(permits, 0, anyUnit)}. * * @param permits the number of permits to acquire
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Sat Oct 19 00:51:36 UTC 2024 - 21.6K bytes - Viewed (0) -
android/guava/src/com/google/common/util/concurrent/Uninterruptibles.java
} } } finally { if (interrupted) { Thread.currentThread().interrupt(); } } } /** * Invokes {@code semaphore.}{@link Semaphore#tryAcquire(int, long, TimeUnit) tryAcquire(1, * timeout, unit)} uninterruptibly. * * @since NEXT (but since 28.0 in the JRE flavor) */ @J2ktIncompatible @GwtIncompatible // concurrency
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Sat Oct 19 00:51:36 UTC 2024 - 20.1K bytes - Viewed (0) -
android/guava/src/com/google/common/util/concurrent/RateLimiter.java
*/ @SuppressWarnings("GoodTime") // should accept a java.time.Duration public boolean tryAcquire(long timeout, TimeUnit unit) { return tryAcquire(1, timeout, unit); } /** * Acquires permits from this {@link RateLimiter} if it can be acquired immediately without delay. * * <p>This method is equivalent to {@code tryAcquire(permits, 0, anyUnit)}. * * @param permits the number of permits to acquire
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Sat Oct 19 00:51:36 UTC 2024 - 21.9K bytes - Viewed (0) -
guava/src/com/google/common/util/concurrent/Uninterruptibles.java
} } } finally { if (interrupted) { Thread.currentThread().interrupt(); } } } /** * Invokes {@code semaphore.}{@link Semaphore#tryAcquire(int, long, TimeUnit) tryAcquire(1, * timeout, unit)} uninterruptibly. * * @since 28.0 (but only since 33.4.0 in the Android flavor) */ @J2ktIncompatible @GwtIncompatible // concurrency
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Sat Oct 19 00:51:36 UTC 2024 - 19.1K bytes - Viewed (0) -
guava-tests/test/com/google/common/base/FinalizableReferenceQueueClassLoaderUnloadingTest.java
Field sepFrqUserFinalizedF = sepFrqUserC.getField("finalized"); Semaphore finalizeCount = (Semaphore) sepFrqUserFinalizedF.get(null); boolean finalized = finalizeCount.tryAcquire(5, SECONDS); assertTrue(finalized); Field sepFrqUserFrqF = sepFrqUserC.getField("frq"); Closeable frq = (Closeable) sepFrqUserFrqF.get(null); frq.close();
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Sat Oct 19 00:26:48 UTC 2024 - 13.3K bytes - Viewed (0) -
guava-tests/test/com/google/common/util/concurrent/JSR166TestCase.java
} catch (Throwable t) { threadUnexpectedException(t); } } public void await(Semaphore semaphore) { try { assertTrue(semaphore.tryAcquire(LONG_DELAY_MS, MILLISECONDS)); } catch (Throwable t) { threadUnexpectedException(t); } } // /** // * Spin-waits up to LONG_DELAY_MS until flag becomes true. // */
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Thu Oct 17 02:42:09 UTC 2024 - 37.9K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/util/concurrent/JSR166TestCase.java
} catch (Throwable t) { threadUnexpectedException(t); } } public void await(Semaphore semaphore) { try { assertTrue(semaphore.tryAcquire(LONG_DELAY_MS, MILLISECONDS)); } catch (Throwable t) { threadUnexpectedException(t); } } // /** // * Spin-waits up to LONG_DELAY_MS until flag becomes true. // */
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Thu Oct 17 02:42:09 UTC 2024 - 37.9K bytes - Viewed (0)