- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 93 for Lock (0.02 sec)
-
android/guava-tests/test/com/google/common/util/concurrent/UninterruptiblesTest.java
} 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(); } finally { lock.unlock(); } } @Override
Registered: 2025-05-30 12:43 - Last Modified: 2025-05-13 18:46 - 31.8K bytes - Viewed (0) -
android/guava/src/com/google/common/util/concurrent/AbstractScheduledService.java
* always under a lock. */ private static final class SupplantableFuture implements Cancellable { private final ReentrantLock lock; @GuardedBy("lock") private Future<@Nullable Void> currentFuture; SupplantableFuture(ReentrantLock lock, Future<@Nullable Void> currentFuture) { this.lock = lock; this.currentFuture = currentFuture; }
Registered: 2025-05-30 12:43 - Last Modified: 2025-04-14 16:07 - 27.7K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/util/concurrent/StripedTest.java
} }; private static final Supplier<Lock> LOCK_SUPPLER = new Supplier<Lock>() { @Override public Lock get() { return new ReentrantLock(); } }; private static final Supplier<Lock> FAIR_LOCK_SUPPLER = new Supplier<Lock>() { @Override public Lock get() { return new ReentrantLock(true); } };
Registered: 2025-05-30 12:43 - Last Modified: 2025-05-13 17:27 - 8.5K bytes - Viewed (0) -
guava-tests/test/com/google/common/util/concurrent/UninterruptiblesTest.java
} 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(); } finally { lock.unlock(); } } @Override
Registered: 2025-05-30 12:43 - Last Modified: 2025-05-13 18:46 - 31.8K bytes - Viewed (0) -
internal/lru/lru.go
c.mu.Lock() bucketIdx := c.nextCleanupBucket timeToExpire := time.Until(c.buckets[bucketIdx].newestEntry) // wait for newest entry to expire before cleanup without holding lock if timeToExpire > 0 { c.mu.Unlock() time.Sleep(timeToExpire) c.mu.Lock() } for _, ent := range c.buckets[bucketIdx].entries { c.removeElement(ent) } c.nextCleanupBucket = (c.nextCleanupBucket + 1) % numBuckets
Registered: 2025-05-25 09:35 - Last Modified: 2025-04-25 08:22 - 12.5K bytes - Viewed (0) -
okhttp-testing-support/src/main/kotlin/okhttp3/RecordingEventListener.kt
/** The timestamp of the last taken event, used to measure elapsed time between events. */ private var lastTimestampNs: Long? = null /** Confirm that the thread does not hold a lock on `lock` during the callback. */ fun forbidLock(lock: Any) { forbiddenLocks.add(lock) } /** * Removes recorded events up to (and including) an event is found whose class equals [eventClass] * and returns it. */
Registered: 2025-05-30 11:42 - Last Modified: 2025-05-27 14:58 - 9.5K bytes - Viewed (0) -
android/guava/src/com/google/common/util/concurrent/Uninterruptibles.java
} /** * Invokes {@code lock.}{@link Lock#tryLock(long, TimeUnit) tryLock(timeout, unit)} * uninterruptibly. * * @since 30.0 */ @J2ktIncompatible @GwtIncompatible // concurrency @SuppressWarnings("GoodTime") // should accept a java.time.Duration public static boolean tryLockUninterruptibly(Lock lock, long timeout, TimeUnit unit) {
Registered: 2025-05-30 12:43 - Last Modified: 2025-04-14 16:07 - 19.8K bytes - Viewed (0) -
android/guava-testlib/src/com/google/common/testing/TearDownStack.java
@GwtCompatible @NullMarked public class TearDownStack implements TearDownAccepter { private static final Logger logger = Logger.getLogger(TearDownStack.class.getName()); @VisibleForTesting final Object lock = new Object(); @GuardedBy("lock") final Deque<TearDown> stack = new ArrayDeque<>(); private final boolean suppressThrows; public TearDownStack() { this.suppressThrows = false; }
Registered: 2025-05-30 12:43 - Last Modified: 2025-05-13 17:27 - 2.5K bytes - Viewed (0) -
guava-testlib/src/com/google/common/testing/TearDownStack.java
@GwtCompatible @NullMarked public class TearDownStack implements TearDownAccepter { private static final Logger logger = Logger.getLogger(TearDownStack.class.getName()); @VisibleForTesting final Object lock = new Object(); @GuardedBy("lock") final Deque<TearDown> stack = new ArrayDeque<>(); private final boolean suppressThrows; public TearDownStack() { this.suppressThrows = false; }
Registered: 2025-05-30 12:43 - Last Modified: 2025-05-13 17:27 - 2.5K bytes - Viewed (0) -
android/guava/src/com/google/common/base/Suppliers.java
in.defaultReadObject(); lock = new Object(); } @GwtIncompatible @J2ktIncompatible private static final long serialVersionUID = 0; } @VisibleForTesting static class NonSerializableMemoizingSupplier<T extends @Nullable Object> implements Supplier<T> { private final Object lock = new Object();
Registered: 2025-05-30 12:43 - Last Modified: 2025-05-22 16:28 - 16.5K bytes - Viewed (0)