commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Holger Hoffstaette" <hol...@wizards.de>
Subject Re: [pool] GenericKeyedObjectPool, WHEN_EXHAUSTED_BLOCK & multiple threads
Date Sun, 29 Oct 2006 11:13:50 GMT

Hi Sandy,

On Sat, 28 Oct 2006 21:12:06 -0400, Sandy McArthur wrote:
> The next release of pool has a KeyedObjectPool implementation that
> basically uses a monitor per key. There is a "global" monitor for
> accessing the the internal pool for the key but it is very briefly held.
> This code has been in waiting for too long while I hoped to find time to
> optimize it some more but that free time hasn't manifested itself. I'll
> move to release Pool 2 with the current trunk in the next few days.

Great! One other thing I found was that the second map for counting the
per-key active objects can really be removed into having a simple
QueueInfo object that holds the queue, int active objects and (maybe in
the future?) other values. A simple "struct" with public fields should be
enough for that.

Holger



---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Mime
View raw message