- Sort Score
- Result 10 results
- Languages All
Results 51 - 58 of 58 for newConditions (0.15 sec)
-
android/guava/src/com/google/common/util/concurrent/Monitor.java
* * <pre>{@code * public class SafeBox<V> { * private V value; * private final ReentrantLock lock = new ReentrantLock(); * private final Condition valuePresent = lock.newCondition(); * private final Condition valueAbsent = lock.newCondition(); * * public V get() throws InterruptedException { * lock.lock(); * try { * while (value == null) { * valuePresent.await(); * }
Registered: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Mon Dec 04 18:22:01 UTC 2023 - 38.6K bytes - Viewed (0) -
guava/src/com/google/common/util/concurrent/Monitor.java
* * <pre>{@code * public class SafeBox<V> { * private V value; * private final ReentrantLock lock = new ReentrantLock(); * private final Condition valuePresent = lock.newCondition(); * private final Condition valueAbsent = lock.newCondition(); * * public V get() throws InterruptedException { * lock.lock(); * try { * while (value == null) { * valuePresent.await(); * }
Registered: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Mon Dec 04 18:22:01 UTC 2023 - 42.5K bytes - Viewed (0) -
platforms/core-execution/persistent-cache/src/main/java/org/gradle/cache/internal/DefaultCacheCoordinator.java
private ExclusiveCacheAccessingWorker cacheAccessWorker; private final Lock stateLock = new ReentrantLock(); // protects the following state private final Condition condition = stateLock.newCondition(); private boolean open; private Thread owner; private FileLock fileLock; private FileLock.State stateAtOpen; private Runnable fileLockHeldByOwner; private int cacheClosedCount;
Registered: Wed Jun 12 18:38:38 UTC 2024 - Last Modified: Wed May 01 12:21:15 UTC 2024 - 20.5K bytes - Viewed (0) -
platforms/core-execution/persistent-cache/src/main/java/org/gradle/cache/internal/DefaultFileLockManager.java
static class AwaitableFileLockReleasedSignal implements FileLockReleasedSignal, ExponentialBackoff.Signal { private final Lock lock = new ReentrantLock(); private final Condition condition = lock.newCondition(); private int waiting; @SuppressWarnings("WaitNotInLoop") @Override public boolean await(long millis) throws InterruptedException { lock.lock();
Registered: Wed Jun 12 18:38:38 UTC 2024 - Last Modified: Fri Apr 26 16:02:32 UTC 2024 - 22.3K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/http2/Http2Stream.kt
val id: Int, val connection: Http2Connection, outFinished: Boolean, inFinished: Boolean, headers: Headers?, ) { internal val lock: ReentrantLock = ReentrantLock() val condition: Condition = lock.newCondition() // Internal state is guarded by [lock]. No long-running or potentially blocking operations are // performed while the lock is held. /** The bytes consumed and acknowledged by the stream. */
Registered: Sun Jun 16 04:42:17 UTC 2024 - Last Modified: Sat Apr 20 17:03:43 UTC 2024 - 23.2K bytes - Viewed (0) -
guava-tests/test/com/google/common/util/concurrent/UninterruptiblesTest.java
delay, unit); return testCondition; } static TestCondition create() { Lock lock = new ReentrantLock(); Condition condition = lock.newCondition(); return new TestCondition(lock, condition); } @Override public void await() throws InterruptedException { lock.lock(); try { condition.await();
Registered: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Mon Jun 10 16:06:39 UTC 2024 - 31.7K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/util/concurrent/UninterruptiblesTest.java
delay, unit); return testCondition; } static TestCondition create() { Lock lock = new ReentrantLock(); Condition condition = lock.newCondition(); return new TestCondition(lock, condition); } @Override public void await() throws InterruptedException { lock.lock(); try { condition.await();
Registered: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Wed Feb 09 22:57:07 UTC 2022 - 30.9K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/http2/Http2Connection.kt
*/ @Suppress("NAME_SHADOWING") class Http2Connection internal constructor(builder: Builder) : Closeable { internal val lock: ReentrantLock = ReentrantLock() internal val condition: Condition = lock.newCondition() // Internal state of this connection is guarded by 'lock'. No blocking operations may be // performed while holding this lock! // // Socket writes are guarded by frameWriter. //
Registered: Sun Jun 16 04:42:17 UTC 2024 - Last Modified: Sat Apr 20 17:03:43 UTC 2024 - 32.6K bytes - Viewed (0)