You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "David Mollitor (Jira)" <ji...@apache.org> on 2021/02/08 00:03:00 UTC
[jira] [Created] (POOL-392) Add Async addObjects Implementation
David Mollitor created POOL-392:
-----------------------------------
Summary: Add Async addObjects Implementation
Key: POOL-392
URL: https://issues.apache.org/jira/browse/POOL-392
Project: Commons Pool
Issue Type: Improvement
Reporter: David Mollitor
{code:java|title=ObjectPool.java}
default void addObjects(final int count) throws Exception {
for (int i = 0; i < count; i++) {
addObject();
}
}
{code}
I have a use case where `addObject` is a very expensive call: ~2m. So, to pre-populate the pool with 5 objects requires 10m+. Would be nice to have an async (ExecutorService) version which loads the pool in parallel.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)