equal
deleted
inserted
replaced
1287 assertFalse(c.await(Long.MIN_VALUE, NANOSECONDS)); |
1287 assertFalse(c.await(Long.MIN_VALUE, NANOSECONDS)); |
1288 sync.release(); |
1288 sync.release(); |
1289 } |
1289 } |
1290 |
1290 |
1291 /** |
1291 /** |
1292 * Disabled demo test for (unfixed as of 2017-11) |
|
1293 * JDK-8191483: AbstractQueuedSynchronizer cancel/cancel race |
1292 * JDK-8191483: AbstractQueuedSynchronizer cancel/cancel race |
1294 * ant -Djsr166.tckTestClass=AbstractQueuedSynchronizerTest -Djsr166.methodFilter=testCancelCancelRace -Djsr166.runsPerTest=100 tck |
1293 * ant -Djsr166.tckTestClass=AbstractQueuedSynchronizerTest -Djsr166.methodFilter=testCancelCancelRace -Djsr166.runsPerTest=100 tck |
1295 */ |
1294 */ |
1296 public void DISABLED_testCancelCancelRace() throws InterruptedException { |
1295 public void testCancelCancelRace() throws InterruptedException { |
1297 class Sync extends AbstractQueuedSynchronizer { |
1296 class Sync extends AbstractQueuedSynchronizer { |
1298 protected boolean tryAcquire(int acquires) { |
1297 protected boolean tryAcquire(int acquires) { |
1299 return !hasQueuedPredecessors() && compareAndSetState(0, 1); |
1298 return !hasQueuedPredecessors() && compareAndSetState(0, 1); |
1300 } |
1299 } |
1301 protected boolean tryRelease(int releases) { |
1300 protected boolean tryRelease(int releases) { |