jpos/jPOS — comment on commit 2e411f8af854d6fec166b18dfc5ff644b9d1c660
File:  line 0
By marksalter:

Rather than waiting outside of the creation, can we instead ensure thatThreadPool.init doesn't finish until the pool is really ready?

For ThreadPool :-

private void init(int poolSize){
while (running < Math.min (poolSize > 0 ? poolSize : 1, maxPoolSize)) {
running++;
Thread t = new PooledThread();
t.start();
while (!t.isAlive()) {
ISOUtil.sleep(10);
}
}
}

But I am uncertain that Thread.isAlive() will do what I intend - perhaps there is another approach - and the delay might need to be externalised?