- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 252 for lock (0.2 sec)
-
guava-tests/test/com/google/common/util/concurrent/CycleDetectingLockFactoryTest.java
checkMessage(expected, "LockC -> LockA", "LockB -> LockC", "LockA -> LockB"); } public void testReentrancy_noDeadlock() { lockA.lock(); lockB.lock(); lockA.lock(); // Should not assert on lockB -> reentrant(lockA) } public void testExplicitOrdering_noViolations() { lock1.lock(); lock3.lock(); lock3.unlock(); lock2.lock(); lock3.lock(); }
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
checkMessage(expected, "LockC -> LockA", "LockB -> LockC", "LockA -> LockB"); } public void testReentrancy_noDeadlock() { lockA.lock(); lockB.lock(); lockA.lock(); // Should not assert on lockB -> reentrant(lockA) } public void testExplicitOrdering_noViolations() { lock1.lock(); lock3.lock(); lock3.unlock(); lock2.lock(); lock3.lock(); }
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) -
android/guava/src/com/google/common/util/concurrent/CycleDetectingLockFactory.java
* * Lock lockA = factory1.newReentrantLock(MyLockOrder.FIRST); * Lock lockB = factory1.newReentrantLock(MyLockOrder.FIRST); * Lock lockC = factory2.newReentrantLock(MyLockOrder.FIRST); * * lockA.lock(); * * lockB.lock(); // will throw an IllegalStateException * lockC.lock(); // will throw an IllegalStateException * * lockA.lock(); // reentrant acquisition is okay * }</pre> *
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) -
android/guava-tests/test/com/google/common/util/concurrent/StripedTest.java
.add(new Striped.SmallLazyStriped<ReadWriteLock>(50, READ_WRITE_LOCK_SUPPLIER)) .add(new Striped.SmallLazyStriped<ReadWriteLock>(64, READ_WRITE_LOCK_SUPPLIER)) .add(new Striped.LargeLazyStriped<ReadWriteLock>(50, READ_WRITE_LOCK_SUPPLIER)) .add(new Striped.LargeLazyStriped<ReadWriteLock>(64, READ_WRITE_LOCK_SUPPLIER)) .add(new Striped.SmallLazyStriped<Lock>(50, LOCK_SUPPLER))
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) -
guava-tests/test/com/google/common/util/concurrent/TestThread.java
* test with reference to the same "lock-like object", and then their interactions with that object * are choreographed via the various methods on this class. * * <p>A "lock-like object" is really any object that may be used for concurrency control. If the * {@link #callAndAssertBlocks} method is ever called in a test, the lock-like object must have a * method equivalent to {@link java.util.concurrent.locks.ReentrantLock#hasQueuedThread(Thread)}. If
Java - Registered: Fri Apr 12 12:43:09 GMT 2024 - Last Modified: Wed Apr 26 20:07:17 GMT 2023 - 10.9K bytes - Viewed (0) -
android/guava/src/com/google/common/util/concurrent/ForwardingLock.java
import java.util.concurrent.TimeUnit; import java.util.concurrent.locks.Condition; import java.util.concurrent.locks.Lock; /** Forwarding wrapper around a {@code Lock}. */ @J2ktIncompatible @ElementTypesAreNonnullByDefault abstract class ForwardingLock implements Lock { abstract Lock delegate(); @Override public void lock() { delegate().lock(); } @Override
Java - Registered: Fri Apr 26 12:43:10 GMT 2024 - Last Modified: Tue Apr 04 09:45:04 GMT 2023 - 1.5K bytes - Viewed (0) -
maven-core/src/main/java/org/apache/maven/lifecycle/internal/MojoExecutor.java
import java.util.List; import java.util.Map; import java.util.Set; import java.util.TreeSet; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.locks.Lock; import java.util.concurrent.locks.ReentrantLock; import java.util.concurrent.locks.ReentrantReadWriteLock; import org.apache.maven.api.SessionData; import org.apache.maven.api.services.MessageBuilderFactory; import org.apache.maven.artifact.Artifact;
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/Monitor.java
} final ReentrantLock lock = this.lock; lock.lock(); boolean satisfied = false; try { return satisfied = guard.isSatisfied(); } finally { if (!satisfied) { lock.unlock(); } } } /** * Enters this monitor if the guard is satisfied. Blocks at most the given time acquiring the * lock, but does not wait for the guard to be satisfied.
Java - Registered: Fri Apr 26 12:43:10 GMT 2024 - Last Modified: Mon Dec 04 18:22:01 GMT 2023 - 38.6K 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) { boolean interrupted = false;
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) -
android/guava/src/com/google/common/util/concurrent/MoreExecutors.java
* ListenableFuture} listeners, should take care not to do so while holding a lock. Additionally, * as a further line of defense, prefer not to perform any locking inside a task that will be run * under {@code directExecutor}: Not only might the wait for a lock be long, but if the running * thread was holding a lock, the listener may deadlock or break lock isolation. * * <p>This instance is equivalent to: *
Java - Registered: Fri Apr 26 12:43:10 GMT 2024 - Last Modified: Wed Apr 17 16:33:44 GMT 2024 - 41.8K bytes - Viewed (0)