commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Peter Steijn" <>
Subject Re: [pool] Proposal: New Pool Impl -- GeneratorObjectPool
Date Sat, 01 Apr 2006 16:15:44 GMT
> This should probably be changed. There is no reason addObject cannot
> have the old blocking behavior and still have the generator behavior
> for calls to borrowObject that need to create a new pooled object.
> This change will break code like:
> while (pool.getNumIdle() < 5) {
>   pool.addObject();
> }
> by the time the getNumIdle returns 5 about 1000 objects will be
> scheduled to be added to the pool.

true, but I would still like to give the user the option to call a
non-blocking addObject in case they want to use the functionality.

Perhaps I should provide a function overloaded type where you can either
addObject(boolean)  where boolean is a flag that sets whether the addObject
should block or not?

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message