1 |
|
/* |
2 |
|
* Written by Doug Lea with assistance from members of JCP JSR-166 |
3 |
|
* Expert Group and released to the public domain, as explained at |
4 |
< |
* http://creativecommons.org/licenses/publicdomain |
4 |
> |
* http://creativecommons.org/publicdomain/zero/1.0/ |
5 |
|
* Other contributors include Andrew Wright, Jeffrey Hayes, |
6 |
|
* Pat Fisher, Mike Judd. |
7 |
|
*/ |
159 |
|
q.put(null); |
160 |
|
shouldThrow(); |
161 |
|
} catch (NullPointerException success) {} |
162 |
< |
} |
162 |
> |
} |
163 |
|
|
164 |
|
/** |
165 |
|
* put blocks interruptibly if no active taker |
397 |
|
long t0 = System.nanoTime(); |
398 |
|
assertTrue(q.offer(zero, LONG_DELAY_MS, MILLISECONDS)); |
399 |
|
assertTrue(millisElapsedSince(t0) < MEDIUM_DELAY_MS); |
400 |
< |
|
400 |
> |
|
401 |
|
t.interrupt(); |
402 |
|
awaitTermination(t, MEDIUM_DELAY_MS); |
403 |
|
} |