- Sort Score
- Result 10 results
- Languages All
Results 1 - 7 of 7 for writeLock (0.17 sec)
-
guava-tests/test/com/google/common/util/concurrent/CycleDetectingLockFactoryTest.java
// Establish an ordering from writeLockA -> writeLockB. writeLockA.lock(); writeLockB.lock(); writeLockB.unlock(); writeLockA.unlock(); // Establish an ordering from writeLockB -> writeLockC. writeLockB.lock(); writeLockC.lock(); writeLockB.unlock(); // writeLockC -> writeLockA should fail. PotentialDeadlockException expected =
Java - Registered: Fri Apr 12 12:43:09 GMT 2024 - Last Modified: Wed Sep 06 17:04:31 GMT 2023 - 16.1K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/util/concurrent/CycleDetectingLockFactoryTest.java
// Establish an ordering from writeLockA -> writeLockB. writeLockA.lock(); writeLockB.lock(); writeLockB.unlock(); writeLockA.unlock(); // Establish an ordering from writeLockB -> writeLockC. writeLockB.lock(); writeLockC.lock(); writeLockB.unlock(); // writeLockC -> writeLockA should fail. PotentialDeadlockException expected =
Java - Registered: Fri May 03 12:43:13 GMT 2024 - Last Modified: Wed Sep 06 17:04:31 GMT 2023 - 16.1K bytes - Viewed (1) -
guava-tests/test/com/google/common/util/concurrent/StripedTest.java
Lock readLock = striped.get(key).readLock(); WeakReference<Object> garbage = new WeakReference<>(new Object()); GcFinalization.awaitClear(garbage); Lock writeLock = striped.get(key).writeLock(); readLock.lock(); assertFalse(writeLock.tryLock()); readLock.unlock(); } @AndroidIncompatible // Presumably GC doesn't trigger, despite our efforts. public void testStrongImplementations() {
Java - Registered: Fri Apr 12 12:43:09 GMT 2024 - Last Modified: Wed Feb 09 22:57:07 GMT 2022 - 8.4K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/util/concurrent/StripedTest.java
Lock readLock = striped.get(key).readLock(); WeakReference<Object> garbage = new WeakReference<>(new Object()); GcFinalization.awaitClear(garbage); Lock writeLock = striped.get(key).writeLock(); readLock.lock(); assertFalse(writeLock.tryLock()); readLock.unlock(); } @AndroidIncompatible // Presumably GC doesn't trigger, despite our efforts. public void testStrongImplementations() {
Java - Registered: Fri May 03 12:43:13 GMT 2024 - Last Modified: Wed Feb 09 22:57:07 GMT 2022 - 8.4K bytes - Viewed (0) -
android/guava/src/com/google/common/util/concurrent/CycleDetectingLockFactory.java
this.writeLock = new CycleDetectingReentrantWriteLock(this); this.lockGraphNode = Preconditions.checkNotNull(lockGraphNode); } ///// Overridden ReentrantReadWriteLock methods. ///// @Override public ReadLock readLock() { return readLock; } @Override public WriteLock writeLock() { return writeLock; }
Java - Registered: Fri Apr 26 12:43:10 GMT 2024 - Last Modified: Fri Dec 15 19:31:54 GMT 2023 - 35.9K bytes - Viewed (0) -
maven-core/src/main/java/org/apache/maven/lifecycle/internal/MojoExecutor.java
if (session.getRequest().getDegreeOfConcurrency() > 1) { boolean aggregator = mojoDescriptor.isAggregator(); acquiredAggregatorLock = aggregator ? aggregatorLock.writeLock() : aggregatorLock.readLock(); acquiredProjectLock = getProjectLock(session); if (!acquiredAggregatorLock.tryLock()) { Thread owner = aggregatorLock.getOwner();
Java - Registered: Sun May 05 03:35:11 GMT 2024 - Last Modified: Wed Feb 28 23:31:09 GMT 2024 - 20.7K bytes - Viewed (0) -
android/guava/src/com/google/common/util/concurrent/Striped.java
} @Override public Lock readLock() { return new WeakSafeLock(delegate.readLock(), this); } @Override public Lock writeLock() { return new WeakSafeLock(delegate.writeLock(), this); } } /** Lock object that ensures a strong reference is retained to a specified object. */ private static final class WeakSafeLock extends ForwardingLock {
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)