13 |
|
import java.util.concurrent.CompletionService; |
14 |
|
import java.util.concurrent.CountDownLatch; |
15 |
|
import java.util.concurrent.ExecutionException; |
16 |
– |
import java.util.concurrent.Executor; |
16 |
|
import java.util.concurrent.ExecutorCompletionService; |
17 |
|
import java.util.concurrent.ExecutorService; |
18 |
|
import java.util.concurrent.Future; |
145 |
|
CompletionService cs = new ExecutorCompletionService(cachedThreadPool); |
146 |
|
final CountDownLatch proceed = new CountDownLatch(1); |
147 |
|
cs.submit(new Callable() { public String call() throws Exception { |
148 |
< |
proceed.await(); |
148 |
> |
await(proceed); |
149 |
|
return TEST_STRING; |
150 |
|
}}); |
151 |
|
assertNull(cs.poll()); |