Home
last modified time | relevance | path

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

/libcore/jsr166-tests/src/test/java/jsr166/
DSynchronousQueueTest.java32 public void testEmptyFull(boolean fair) { in testEmptyFull() argument
33 final SynchronousQueue q = new SynchronousQueue(fair); in testEmptyFull()
45 public void testOffer(boolean fair) { in testOffer() argument
46 SynchronousQueue q = new SynchronousQueue(fair); in testOffer()
55 public void testAdd(boolean fair) { in testAdd() argument
56 SynchronousQueue q = new SynchronousQueue(fair); in testAdd()
69 public void testAddAll_self(boolean fair) { in testAddAll_self() argument
70 SynchronousQueue q = new SynchronousQueue(fair); in testAddAll_self()
82 public void testAddAll_ISE(boolean fair) { in testAddAll_ISE() argument
83 SynchronousQueue q = new SynchronousQueue(fair); in testAddAll_ISE()
[all …]
DReentrantReadWriteLockTest.java50 PublicReentrantReadWriteLock(boolean fair) { super(fair); } in PublicReentrantReadWriteLock() argument
197 public void testLock(boolean fair) { in testLock() argument
199 new PublicReentrantReadWriteLock(fair); in testLock()
219 public void testGetWriteHoldCount(boolean fair) { in testGetWriteHoldCount() argument
220 ReentrantReadWriteLock lock = new ReentrantReadWriteLock(fair); in testGetWriteHoldCount()
236 public void testGetHoldCount(boolean fair) { in testGetHoldCount() argument
237 ReentrantReadWriteLock lock = new ReentrantReadWriteLock(fair); in testGetHoldCount()
253 public void testGetReadHoldCount(boolean fair) { in testGetReadHoldCount() argument
254 ReentrantReadWriteLock lock = new ReentrantReadWriteLock(fair); in testGetReadHoldCount()
270 public void testWriteUnlock_IMSE(boolean fair) { in testWriteUnlock_IMSE() argument
[all …]
DReentrantLockTest.java49 PublicReentrantLock(boolean fair) { super(fair); } in PublicReentrantLock() argument
186 public void testLock(boolean fair) { in testLock() argument
187 PublicReentrantLock lock = new PublicReentrantLock(fair); in testLock()
198 public void testUnlock_IMSE(boolean fair) { in testUnlock_IMSE() argument
199 ReentrantLock lock = new ReentrantLock(fair); in testUnlock_IMSE()
211 public void testTryLock(boolean fair) { in testTryLock() argument
212 PublicReentrantLock lock = new PublicReentrantLock(fair); in testTryLock()
226 public void testHasQueuedThreads(boolean fair) { in testHasQueuedThreads() argument
227 final PublicReentrantLock lock = new PublicReentrantLock(fair); in testHasQueuedThreads()
252 public void testGetQueueLength(boolean fair) { in testGetQueueLength() argument
[all …]
DSemaphoreTest.java24 PublicSemaphore(int permits, boolean fair) { super(permits, fair); } in PublicSemaphore() argument
147 public void testConstructor(boolean fair) { in testConstructor() argument
149 Semaphore s = new Semaphore(permits, fair); in testConstructor()
151 assertEquals(fair, s.isFair()); in testConstructor()
171 public void testTryAcquireInSameThread(boolean fair) { in testTryAcquireInSameThread() argument
172 Semaphore s = new Semaphore(2, fair); in testTryAcquireInSameThread()
187 public void testTryAcquire_timeout(boolean fair) { in testTryAcquire_timeout() argument
188 Semaphore s = new Semaphore(0, fair); in testTryAcquire_timeout()
200 public void testTryAcquireN_timeout(boolean fair) { in testTryAcquireN_timeout() argument
201 Semaphore s = new Semaphore(2, fair); in testTryAcquireN_timeout()
[all …]
/libcore/luni/src/main/java/java/util/concurrent/
DSemaphore.java250 public Semaphore(int permits, boolean fair) { in Semaphore() argument
251 sync = fair ? new FairSync(permits) : new NonfairSync(permits); in Semaphore()
DSynchronousQueue.java833 public SynchronousQueue(boolean fair) { in SynchronousQueue() argument
834 transferer = fair ? new TransferQueue<E>() : new TransferStack<E>(); in SynchronousQueue()
1136 boolean fair = transferer instanceof TransferQueue; in writeObject()
1137 if (fair) { in writeObject()
DArrayBlockingQueue.java222 public ArrayBlockingQueue(int capacity, boolean fair) { in ArrayBlockingQueue() argument
226 lock = new ReentrantLock(fair); in ArrayBlockingQueue()
247 public ArrayBlockingQueue(int capacity, boolean fair, in ArrayBlockingQueue() argument
249 this(capacity, fair); in ArrayBlockingQueue()
/libcore/luni/src/main/java/java/util/concurrent/locks/
DReentrantLock.java237 public ReentrantLock(boolean fair) { in ReentrantLock() argument
238 sync = fair ? new FairSync() : new NonfairSync(); in ReentrantLock()
DReentrantReadWriteLock.java211 public ReentrantReadWriteLock(boolean fair) { in ReentrantReadWriteLock() argument
212 sync = fair ? new FairSync() : new NonfairSync(); in ReentrantReadWriteLock()