/libcore/jsr166-tests/src/test/java/jsr166/ |
D | SynchronousQueueTest.java | 60 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 …]
|
D | ReentrantReadWriteLockTest.java | 65 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 …]
|
D | ReentrantLockTest.java | 64 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 …]
|
D | SemaphoreTest.java | 37 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/ |
D | SynchronousQueueTest.java | 81 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 …]
|
D | ReentrantReadWriteLockTest.java | 88 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 …]
|
D | ReentrantLockTest.java | 87 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 …]
|
D | SemaphoreTest.java | 60 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 …]
|
D | ArrayBlockingQueueTest.java | 65 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/ |
D | Semaphore.java | 285 public Semaphore(int permits, boolean fair) { in Semaphore() argument 286 sync = fair ? new FairSync(permits) : new NonfairSync(permits); in Semaphore()
|
D | SynchronousQueue.java | 826 public SynchronousQueue(boolean fair) { in SynchronousQueue() argument 827 transferer = fair ? new TransferQueue<E>() : new TransferStack<E>(); in SynchronousQueue() 1133 boolean fair = transferer instanceof TransferQueue; in writeObject() 1134 if (fair) { in writeObject()
|
D | ArrayBlockingQueue.java | 270 public ArrayBlockingQueue(int capacity, boolean fair) { in ArrayBlockingQueue() argument 274 lock = new ReentrantLock(fair); in ArrayBlockingQueue() 295 public ArrayBlockingQueue(int capacity, boolean fair, in ArrayBlockingQueue() argument 297 this(capacity, fair); in ArrayBlockingQueue()
|
/libcore/ojluni/src/main/java/java/util/concurrent/locks/ |
D | ReentrantLock.java | 303 public ReentrantLock(boolean fair) { in ReentrantLock() argument 304 sync = fair ? new FairSync() : new NonfairSync(); in ReentrantLock()
|
D | ReentrantReadWriteLock.java | 240 public ReentrantReadWriteLock(boolean fair) { in ReentrantReadWriteLock() argument 241 sync = fair ? new FairSync() : new NonfairSync(); in ReentrantReadWriteLock()
|
/libcore/ojluni/annotations/hiddenapi/java/util/concurrent/locks/ |
D | ReentrantLock.java | 47 public ReentrantLock(boolean fair) { in ReentrantLock() argument
|