Home
last modified time | relevance | path

Searched refs:tryAcquire (Results 1 – 9 of 9) sorted by relevance

/libcore/luni/src/test/java/tests/api/java/util/concurrent/
DSemaphoreTest.java91 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 …]
DAbstractQueuedSynchronizerTest.java34 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()
DAbstractQueuedLongSynchronizerTest.java38 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/
DSemaphore.java334 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
DThreadPoolExecutor.java593 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/
DReentrantLock.java188 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
DAbstractQueuedSynchronizer.java835 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()
DAbstractQueuedLongSynchronizer.java611 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()
DReentrantReadWriteLock.java353 protected final boolean tryAcquire(int acquires) { in tryAcquire() method in ReentrantReadWriteLock.Sync