commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Thomas <>
Subject Re: [POOL2] Pooling mutable objects
Date Mon, 09 Feb 2015 20:37:20 GMT
On 09/02/2015 18:47, Adrian Crum wrote:
> I have been reading this thread for days, and I am confused.
> I might be wrong, but it seems to me the discussion started with a
> simple problem - an object borrowed from an object pool could not be
> returned to the pool because the object's hash value changed.
> Now the discussion seems to be about how to create the proper hash
> function so the object can be returned to the pool successfully.
> In other words, object A can be borrowed from the pool, and object B can
> be returned to the pool (instead of object A) - as long as object A and
> object B both return the same hash value.
> Does that make sense? Is that what you really want?
> It seems to me the object being returned to the pool should be the same
> object that was borrowed from the pool. A simple equality check (this
> object == that object) would do that.
> What am I missing?

That a scalable solution is required when there are 10s or 100s of
thousands of objects currently borrowed and we need to work out which
one of those is currently being returned.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message