commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From James Carman <>
Subject Re: [pool] Pool config vs. factory hierarchies.
Date Fri, 29 Oct 2010 17:51:25 GMT
On Fri, Oct 29, 2010 at 12:48 PM, sebb <> wrote:
> Yes, but the code will still need to use the read lock whenever it
> reads the field to ensure changes are propagated correctly.
> Both the writer and reader threads need to synch. on the same lock in
> order for changes to be published safely.
> Not sure using a read/write lock would gain anything over using
> volatile - which has the advantage that one cannot bypass it.

I'm not so concerned with access to the variable itself really.  I'm
more concerned with a client trying to borrow/return an object while
the pool is in the middle of reconfiguring itself.

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

View raw message