On 4/1/06, Peter Steijn <[EMAIL PROTECTED]> wrote:
> > 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
> call
> addObject()
> or
> addObject(boolean) where boolean is a flag that sets whether the addObject
> should block or not?
That's fine, it's just the behavior of methods specified by ObjectPool
needs to be preserved.
--
Sandy McArthur
"He who dares not offend cannot be honest."
- Thomas Paine
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]