347 |
|
final SynchronousQueue q = new SynchronousQueue(); |
348 |
|
Thread t = new Thread(new CheckedRunnable() { |
349 |
|
public void realRun() throws InterruptedException { |
350 |
– |
assertNull(q.poll(SHORT_DELAY_MS, MILLISECONDS)); |
351 |
– |
assertSame(zero, q.poll(LONG_DELAY_MS, MILLISECONDS)); |
350 |
|
try { |
351 |
+ |
assertNull(q.poll(SHORT_DELAY_MS, MILLISECONDS)); |
352 |
+ |
assertSame(zero, q.poll(LONG_DELAY_MS, MILLISECONDS)); |
353 |
|
q.poll(LONG_DELAY_MS, MILLISECONDS); |
354 |
|
shouldThrow(); |
355 |
|
} catch (InterruptedException success) {} |
387 |
|
final SynchronousQueue q = new SynchronousQueue(true); |
388 |
|
Thread t = new Thread(new CheckedRunnable() { |
389 |
|
public void realRun() throws InterruptedException { |
390 |
– |
assertNull(q.poll(SHORT_DELAY_MS, MILLISECONDS)); |
391 |
– |
assertSame(zero, q.poll(LONG_DELAY_MS, MILLISECONDS)); |
390 |
|
try { |
391 |
+ |
assertNull(q.poll(SHORT_DELAY_MS, MILLISECONDS)); |
392 |
+ |
assertSame(zero, q.poll(LONG_DELAY_MS, MILLISECONDS)); |
393 |
|
q.poll(LONG_DELAY_MS, MILLISECONDS); |
394 |
|
threadShouldThrow(); |
395 |
|
} catch (InterruptedException success) {} |