ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/jsr166/jsr166/src/test/tck/AbstractQueuedLongSynchronizerTest.java
(Generate patch)

Comparing jsr166/src/test/tck/AbstractQueuedLongSynchronizerTest.java (file contents):
Revision 1.45 by jsr166, Wed Jun 13 18:36:31 2018 UTC vs.
Revision 1.47 by jsr166, Tue Aug 13 03:39:46 2019 UTC

# Line 1265 | Line 1265 | public class AbstractQueuedLongSynchroni
1265  
1266          // A synchronizer only offering a choice of failure modes
1267          class Sync extends AbstractQueuedLongSynchronizer {
1268 <            boolean pleaseThrow;
1268 >            volatile boolean pleaseThrow;
1269              @Override protected boolean tryAcquire(long ignored) {
1270                  if (pleaseThrow) throw ex;
1271                  return false;
# Line 1287 | Line 1287 | public class AbstractQueuedLongSynchroni
1287          final Thread thread = newStartedThread(new CheckedRunnable() {
1288              public void realRun() {
1289                  try {
1290 <                    if (ThreadLocalRandom.current().nextBoolean())
1290 >                    if (randomBoolean())
1291                          s.acquire(1);
1292                      else
1293                          s.acquireShared(1);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines