Home
last modified time | relevance | path

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

/libcore/jsr166-tests/src/test/java/jsr166/
DSemaphoreTest.java108 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 …]
DAbstractQueuedLongSynchronizerTest.java35 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()
DAbstractQueuedSynchronizerTest.java38 @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()
DJSR166TestCase.java810 assertTrue(semaphore.tryAcquire(LONG_DELAY_MS, MILLISECONDS));
/libcore/luni/src/main/java/java/util/concurrent/
DSemaphore.java333 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
DThreadPoolExecutor.java599 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/
DReentrantLock.java183 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
DAbstractQueuedSynchronizer.java840 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()
DAbstractQueuedLongSynchronizer.java610 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()
DReentrantReadWriteLock.java352 protected final boolean tryAcquire(int acquires) { in tryAcquire() method in ReentrantReadWriteLock.Sync