Home
last modified time | relevance | path

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

/libcore/jsr166-tests/src/test/java/jsr166/
DSynchronousQueueTest.java60 public void testEmptyFull(boolean fair) { in testEmptyFull() argument
61 final SynchronousQueue q = new SynchronousQueue(fair); in testEmptyFull()
73 public void testOffer(boolean fair) { in testOffer() argument
74 SynchronousQueue q = new SynchronousQueue(fair); in testOffer()
83 public void testAdd(boolean fair) { in testAdd() argument
84 SynchronousQueue q = new SynchronousQueue(fair); in testAdd()
97 public void testAddAll_self(boolean fair) { in testAddAll_self() argument
98 SynchronousQueue q = new SynchronousQueue(fair); in testAddAll_self()
110 public void testAddAll_ISE(boolean fair) { in testAddAll_ISE() argument
111 SynchronousQueue q = new SynchronousQueue(fair); in testAddAll_ISE()
[all …]
DReentrantReadWriteLockTest.java65 PublicReentrantReadWriteLock(boolean fair) { super(fair); } in PublicReentrantReadWriteLock() argument
216 public void testLock(boolean fair) { in testLock() argument
218 new PublicReentrantReadWriteLock(fair); in testLock()
238 public void testGetWriteHoldCount(boolean fair) { in testGetWriteHoldCount() argument
239 ReentrantReadWriteLock lock = new ReentrantReadWriteLock(fair); in testGetWriteHoldCount()
255 public void testGetHoldCount(boolean fair) { in testGetHoldCount() argument
256 ReentrantReadWriteLock lock = new ReentrantReadWriteLock(fair); in testGetHoldCount()
272 public void testGetReadHoldCount(boolean fair) { in testGetReadHoldCount() argument
273 ReentrantReadWriteLock lock = new ReentrantReadWriteLock(fair); in testGetReadHoldCount()
289 public void testWriteUnlock_IMSE(boolean fair) { in testWriteUnlock_IMSE() argument
[all …]
DReentrantLockTest.java64 PublicReentrantLock(boolean fair) { super(fair); } in PublicReentrantLock() argument
204 public void testLock(boolean fair) { in testLock() argument
205 PublicReentrantLock lock = new PublicReentrantLock(fair); in testLock()
216 public void testUnlock_IMSE(boolean fair) { in testUnlock_IMSE() argument
217 ReentrantLock lock = new ReentrantLock(fair); in testUnlock_IMSE()
229 public void testTryLock(boolean fair) { in testTryLock() argument
230 PublicReentrantLock lock = new PublicReentrantLock(fair); in testTryLock()
244 public void testHasQueuedThreads(boolean fair) { in testHasQueuedThreads() argument
245 final PublicReentrantLock lock = new PublicReentrantLock(fair); in testHasQueuedThreads()
270 public void testGetQueueLength(boolean fair) { in testGetQueueLength() argument
[all …]
DSemaphoreTest.java37 PublicSemaphore(int permits, boolean fair) { super(permits, fair); } in PublicSemaphore() argument
160 public void testConstructor(boolean fair) { in testConstructor() argument
162 Semaphore s = new Semaphore(permits, fair); in testConstructor()
164 assertEquals(fair, s.isFair()); in testConstructor()
184 public void testTryAcquireInSameThread(boolean fair) { in testTryAcquireInSameThread() argument
185 Semaphore s = new Semaphore(2, fair); in testTryAcquireInSameThread()
200 public void testTryAcquire_timeout(boolean fair) { in testTryAcquire_timeout() argument
201 Semaphore s = new Semaphore(0, fair); in testTryAcquire_timeout()
213 public void testTryAcquireN_timeout(boolean fair) { in testTryAcquireN_timeout() argument
214 Semaphore s = new Semaphore(2, fair); in testTryAcquireN_timeout()
[all …]
/libcore/ojluni/src/test/java/util/concurrent/tck/
DSynchronousQueueTest.java81 public void testEmptyFull(boolean fair) { in testEmptyFull() argument
82 final SynchronousQueue q = new SynchronousQueue(fair); in testEmptyFull()
94 public void testOffer(boolean fair) { in testOffer() argument
95 SynchronousQueue q = new SynchronousQueue(fair); in testOffer()
104 public void testAdd(boolean fair) { in testAdd() argument
105 SynchronousQueue q = new SynchronousQueue(fair); in testAdd()
118 public void testAddAll_self(boolean fair) { in testAddAll_self() argument
119 SynchronousQueue q = new SynchronousQueue(fair); in testAddAll_self()
131 public void testAddAll_ISE(boolean fair) { in testAddAll_ISE() argument
132 SynchronousQueue q = new SynchronousQueue(fair); in testAddAll_ISE()
[all …]
DReentrantReadWriteLockTest.java88 PublicReentrantReadWriteLock(boolean fair) { super(fair); } in PublicReentrantReadWriteLock() argument
239 public void testLock(boolean fair) { in testLock() argument
241 new PublicReentrantReadWriteLock(fair); in testLock()
261 public void testGetWriteHoldCount(boolean fair) { in testGetWriteHoldCount() argument
262 final ReentrantReadWriteLock lock = new ReentrantReadWriteLock(fair); in testGetWriteHoldCount()
278 public void testGetHoldCount(boolean fair) { in testGetHoldCount() argument
279 final ReentrantReadWriteLock lock = new ReentrantReadWriteLock(fair); in testGetHoldCount()
295 public void testGetReadHoldCount(boolean fair) { in testGetReadHoldCount() argument
296 final ReentrantReadWriteLock lock = new ReentrantReadWriteLock(fair); in testGetReadHoldCount()
312 public void testWriteUnlock_IMSE(boolean fair) { in testWriteUnlock_IMSE() argument
[all …]
DReentrantLockTest.java87 PublicReentrantLock(boolean fair) { super(fair); } in PublicReentrantLock() argument
227 public void testLock(boolean fair) { in testLock() argument
228 PublicReentrantLock lock = new PublicReentrantLock(fair); in testLock()
239 public void testUnlock_IMSE(boolean fair) { in testUnlock_IMSE() argument
240 final ReentrantLock lock = new ReentrantLock(fair); in testUnlock_IMSE()
252 public void testTryLock(boolean fair) { in testTryLock() argument
253 PublicReentrantLock lock = new PublicReentrantLock(fair); in testTryLock()
267 public void testHasQueuedThreads(boolean fair) { in testHasQueuedThreads() argument
268 final PublicReentrantLock lock = new PublicReentrantLock(fair); in testHasQueuedThreads()
293 public void testGetQueueLength(boolean fair) { in testGetQueueLength() argument
[all …]
DSemaphoreTest.java60 PublicSemaphore(int permits, boolean fair) { super(permits, fair); } in PublicSemaphore() argument
183 public void testConstructor(boolean fair) { in testConstructor() argument
185 Semaphore s = new Semaphore(permits, fair); in testConstructor()
187 assertEquals(fair, s.isFair()); in testConstructor()
207 public void testTryAcquireInSameThread(boolean fair) { in testTryAcquireInSameThread() argument
208 Semaphore s = new Semaphore(2, fair); in testTryAcquireInSameThread()
223 public void testTryAcquire_timeout(boolean fair) { in testTryAcquire_timeout() argument
224 Semaphore s = new Semaphore(0, fair); in testTryAcquire_timeout()
236 public void testTryAcquireN_timeout(boolean fair) { in testTryAcquireN_timeout() argument
237 Semaphore s = new Semaphore(2, fair); in testTryAcquireN_timeout()
[all …]
DArrayBlockingQueueTest.java65 boolean fair = ThreadLocalRandom.current().nextBoolean(); in suite()
66 return populatedQueue(0, SIZE, 2 * SIZE, fair); in suite()
105 int size, int minCapacity, int maxCapacity, boolean fair) { in populatedQueue() argument
142 for (boolean fair : new boolean[] { true, false }) { in testConstructor_nonPositiveCapacity()
144 new ArrayBlockingQueue(i, fair); in testConstructor_nonPositiveCapacity()
/libcore/ojluni/src/main/java/java/util/concurrent/
DSemaphore.java285 public Semaphore(int permits, boolean fair) { in Semaphore() argument
286 sync = fair ? new FairSync(permits) : new NonfairSync(permits); in Semaphore()
DSynchronousQueue.java860 public SynchronousQueue(boolean fair) { in SynchronousQueue() argument
861 transferer = fair ? new TransferQueue<E>() : new TransferStack<E>(); in SynchronousQueue()
1173 boolean fair = transferer instanceof TransferQueue; in writeObject()
1174 if (fair) { in writeObject()
DArrayBlockingQueue.java238 public ArrayBlockingQueue(int capacity, boolean fair) { in ArrayBlockingQueue() argument
242 lock = new ReentrantLock(fair); in ArrayBlockingQueue()
263 public ArrayBlockingQueue(int capacity, boolean fair, in ArrayBlockingQueue() argument
265 this(capacity, fair); in ArrayBlockingQueue()
/libcore/ojluni/src/main/java/java/util/concurrent/locks/
DReentrantLock.java275 public ReentrantLock(boolean fair) { in ReentrantLock() argument
276 sync = fair ? new FairSync() : new NonfairSync(); in ReentrantLock()
DReentrantReadWriteLock.java241 public ReentrantReadWriteLock(boolean fair) { in ReentrantReadWriteLock() argument
242 sync = fair ? new FairSync() : new NonfairSync(); in ReentrantReadWriteLock()
/libcore/ojluni/annotations/hiddenapi/java/util/concurrent/locks/
DReentrantLock.java47 public ReentrantLock(boolean fair) { in ReentrantLock() argument