117 |
|
/** |
118 |
|
* If one exchanging thread is interrupted, another succeeds. |
119 |
|
*/ |
120 |
< |
public void testReplacementAfterExchange() throws InterruptedException { |
120 |
> |
public void testReplacementAfterExchange() { |
121 |
|
final Exchanger e = new Exchanger(); |
122 |
|
final CountDownLatch exchanged = new CountDownLatch(2); |
123 |
|
final CountDownLatch interrupted = new CountDownLatch(1); |
142 |
|
|
143 |
|
await(exchanged); |
144 |
|
t1.interrupt(); |
145 |
– |
interrupted.countDown(); |
145 |
|
awaitTermination(t1); |
146 |
+ |
interrupted.countDown(); |
147 |
|
awaitTermination(t2); |
148 |
|
awaitTermination(t3); |
149 |
|
} |