final ThreadReuseExecutor pool = new ThreadReuseExecutor("test", 1); //$NON-NLS-1$
FutureWork<Boolean> work1 = new FutureWork<Boolean>(new Callable<Boolean>() {
public Boolean call() throws Exception {
synchronized (pool) {
while (pool.getSubmittedCount() < 4) {
pool.wait();
}
}
return true;
}
}, 0);