Made sure NettyResourceFactory.create() returns silently if called multiple times

This commit is contained in:
Trustin Lee 2009-01-12 11:04:07 +00:00
parent 587d623789
commit 733feddebb

View File

@ -40,6 +40,10 @@ public class NettyResourceFactory {
private Executor unterminatableExecutor;
public synchronized void create() {
if (executor != null) {
return;
}
executor = Executors.newCachedThreadPool();
unterminatableExecutor = new UnterminatableExecutor(executor);
}