/libcore/jsr166-tests/src/test/java/jsr166/ |
D | SemaphoreTest.java | 108 tryAcquire() { in tryAcquire() enumConstant 110 assertTrue(s.tryAcquire()); in tryAcquire() 115 assertTrue(s.tryAcquire(permits)); in tryAcquireN() 120 assertTrue(s.tryAcquire(2 * LONG_DELAY_MS, MILLISECONDS)); in tryAcquireTimed() 125 assertTrue(s.tryAcquire(permits, 2 * LONG_DELAY_MS, MILLISECONDS)); in acquire() 174 assertTrue(s.tryAcquire()); in testTryAcquireInSameThread() 175 assertTrue(s.tryAcquire()); in testTryAcquireInSameThread() 177 assertFalse(s.tryAcquire()); in testTryAcquireInSameThread() 178 assertFalse(s.tryAcquire()); in testTryAcquireInSameThread() 190 try { assertFalse(s.tryAcquire(timeoutMillis(), MILLISECONDS)); } in testTryAcquire_timeout() [all …]
|
D | AbstractQueuedLongSynchronizerTest.java | 35 public boolean tryAcquire(long acquires) { in tryAcquire() method in AbstractQueuedLongSynchronizerTest.Mutex 50 public boolean tryAcquire() { in tryAcquire() method in AbstractQueuedLongSynchronizerTest.Mutex 51 return tryAcquire(LOCKED); in tryAcquire() 271 assertTrue(sync.tryAcquire()); in testTryAcquire() 508 assertFalse(sync.tryAcquire()); in testTryAcquireWhenSynced()
|
D | AbstractQueuedSynchronizerTest.java | 38 @Override public boolean tryAcquire(int acquires) { in tryAcquire() method in AbstractQueuedSynchronizerTest.Mutex 54 public boolean tryAcquire() { in tryAcquire() method in AbstractQueuedSynchronizerTest.Mutex 55 return tryAcquire(LOCKED); in tryAcquire() 274 assertTrue(sync.tryAcquire()); in testTryAcquire() 511 assertFalse(sync.tryAcquire()); in testTryAcquireWhenSynced()
|
D | JSR166TestCase.java | 810 assertTrue(semaphore.tryAcquire(LONG_DELAY_MS, MILLISECONDS));
|
/libcore/luni/src/main/java/java/util/concurrent/ |
D | Semaphore.java | 333 public boolean tryAcquire() { in tryAcquire() method in Semaphore 378 public boolean tryAcquire(long timeout, TimeUnit unit) in tryAcquire() method in Semaphore 495 public boolean tryAcquire(int permits) { in tryAcquire() method in Semaphore 550 public boolean tryAcquire(int permits, long timeout, TimeUnit unit) in tryAcquire() method in Semaphore
|
D | ThreadPoolExecutor.java | 599 protected boolean tryAcquire(int unused) { in tryAcquire() method in ThreadPoolExecutor.Worker 614 public boolean tryLock() { return tryAcquire(1); } in tryLock()
|
/libcore/luni/src/main/java/java/util/concurrent/locks/ |
D | ReentrantLock.java | 183 protected final boolean tryAcquire(int acquires) { in tryAcquire() method in ReentrantLock.NonfairSync 202 protected final boolean tryAcquire(int acquires) { in tryAcquire() method in ReentrantLock.FairSync
|
D | AbstractQueuedSynchronizer.java | 840 if (p == head && tryAcquire(arg)) { in acquireQueued() 867 if (p == head && tryAcquire(arg)) { in doAcquireInterruptibly() 900 if (p == head && tryAcquire(arg)) { in doAcquireNanos() 1052 protected boolean tryAcquire(int arg) { in tryAcquire() method in AbstractQueuedSynchronizer 1175 if (!tryAcquire(arg) && in acquire() 1198 if (!tryAcquire(arg)) in acquireInterruptibly() 1223 return tryAcquire(arg) || in tryAcquireNanos()
|
D | AbstractQueuedLongSynchronizer.java | 610 if (p == head && tryAcquire(arg)) { in acquireQueued() 637 if (p == head && tryAcquire(arg)) { in doAcquireInterruptibly() 670 if (p == head && tryAcquire(arg)) { in doAcquireNanos() 822 protected boolean tryAcquire(long arg) { in tryAcquire() method in AbstractQueuedLongSynchronizer 945 if (!tryAcquire(arg) && in acquire() 968 if (!tryAcquire(arg)) in acquireInterruptibly() 993 return tryAcquire(arg) || in tryAcquireNanos()
|
D | ReentrantReadWriteLock.java | 352 protected final boolean tryAcquire(int acquires) { in tryAcquire() method in ReentrantReadWriteLock.Sync
|