This commit is contained in:
kamhung
2015-12-02 17:41:51 +08:00
parent 5fc599a3ca
commit 2e1c3492e4

View File

@@ -55,7 +55,7 @@ public final class ObjectPool<T> implements Supplier<T> {
this.creator = creator;
this.prepare = prepare;
this.recycler = recycler;
this.queue = new ArrayBlockingQueue(Math.max(Runtime.getRuntime().availableProcessors() * 2, max));
this.queue = new LinkedBlockingQueue(Math.max(Runtime.getRuntime().availableProcessors() * 2, max));
this.debug = logger.isLoggable(Level.FINER);
}