Searched refs:tryAcquire (Results 1 – 9 of 9) sorted by relevance
/libcore/luni/src/test/java/tests/api/java/util/concurrent/ |
D | SemaphoreTest.java | 91 assertTrue(s.tryAcquire()); in testTryAcquireInSameThread() 92 assertTrue(s.tryAcquire()); in testTryAcquireInSameThread() 94 assertFalse(s.tryAcquire()); in testTryAcquireInSameThread() 143 assertTrue(s.tryAcquire(SHORT_DELAY_MS, MILLISECONDS)); in testTimedAcquireReleaseInSameThread() 145 assertTrue(s.tryAcquire(SHORT_DELAY_MS, MILLISECONDS)); in testTimedAcquireReleaseInSameThread() 147 assertTrue(s.tryAcquire(SHORT_DELAY_MS, MILLISECONDS)); in testTimedAcquireReleaseInSameThread() 149 assertTrue(s.tryAcquire(SHORT_DELAY_MS, MILLISECONDS)); in testTimedAcquireReleaseInSameThread() 151 assertTrue(s.tryAcquire(SHORT_DELAY_MS, MILLISECONDS)); in testTimedAcquireReleaseInSameThread() 214 assertTrue(s.tryAcquire(SHORT_DELAY_MS, MILLISECONDS)); in testTimedAcquireReleaseInDifferentThreads() 216 assertTrue(s.tryAcquire(SHORT_DELAY_MS, MILLISECONDS)); in testTimedAcquireReleaseInDifferentThreads() [all …]
|
D | AbstractQueuedSynchronizerTest.java | 34 public boolean tryAcquire(int acquires) { in tryAcquire() method in AbstractQueuedSynchronizerTest.Mutex 115 assertTrue(rl.tryAcquire(1)); in testTryAcquire() 346 threadAssertFalse(sync.tryAcquire(1)); in testTryAcquireWhenSynced()
|
D | AbstractQueuedLongSynchronizerTest.java | 38 public boolean tryAcquire(long acquires) { in tryAcquire() method in AbstractQueuedLongSynchronizerTest.Mutex 118 assertTrue(rl.tryAcquire(1)); in testTryAcquire() 349 threadAssertFalse(sync.tryAcquire(1)); in testTryAcquireWhenSynced()
|
/libcore/luni/src/main/java/java/util/concurrent/ |
D | Semaphore.java | 334 public boolean tryAcquire() { in tryAcquire() method in Semaphore 379 public boolean tryAcquire(long timeout, TimeUnit unit) in tryAcquire() method in Semaphore 497 public boolean tryAcquire(int permits) { in tryAcquire() method in Semaphore 552 public boolean tryAcquire(int permits, long timeout, TimeUnit unit) in tryAcquire() method in Semaphore
|
D | ThreadPoolExecutor.java | 593 protected boolean tryAcquire(int unused) { in tryAcquire() method in ThreadPoolExecutor.Worker 608 public boolean tryLock() { return tryAcquire(1); } in tryLock()
|
/libcore/luni/src/main/java/java/util/concurrent/locks/ |
D | ReentrantLock.java | 188 protected final boolean tryAcquire(int acquires) { in tryAcquire() method in ReentrantLock.NonfairSync 207 protected final boolean tryAcquire(int acquires) { in tryAcquire() method in ReentrantLock.FairSync
|
D | AbstractQueuedSynchronizer.java | 835 if (p == head && tryAcquire(arg)) { in acquireQueued() 862 if (p == head && tryAcquire(arg)) { in doAcquireInterruptibly() 893 if (p == head && tryAcquire(arg)) { in doAcquireNanos() 1048 protected boolean tryAcquire(int arg) { in tryAcquire() method in AbstractQueuedSynchronizer 1171 if (!tryAcquire(arg) && in acquire() 1193 if (!tryAcquire(arg)) in acquireInterruptibly() 1217 return tryAcquire(arg) || in tryAcquireNanos()
|
D | AbstractQueuedLongSynchronizer.java | 611 if (p == head && tryAcquire(arg)) { in acquireQueued() 638 if (p == head && tryAcquire(arg)) { in doAcquireInterruptibly() 669 if (p == head && tryAcquire(arg)) { in doAcquireNanos() 824 protected boolean tryAcquire(long arg) { in tryAcquire() method in AbstractQueuedLongSynchronizer 947 if (!tryAcquire(arg) && in acquire() 969 if (!tryAcquire(arg)) in acquireInterruptibly() 993 return tryAcquire(arg) || in tryAcquireNanos()
|
D | ReentrantReadWriteLock.java | 353 protected final boolean tryAcquire(int acquires) { in tryAcquire() method in ReentrantReadWriteLock.Sync
|