Nissim wrote:
>
> The question is what do we lock to prevent two threads from (almost
> simultaneously) creating the same object. We can lock the object which
> is refreshing, to make sure no one touches it while it's refreshing, but
> before an object is in the cache, there's nothing to lock. Would it
> make sense to lock the whole cache while you build something to put in
> there?
Yes. The cache storage object should by synchronized whenever writes
are being made to it.
--
Daniel Rall <[EMAIL PROTECTED]>
http://collab.net/ | open source | do the right thing
------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Search: <http://www.mail-archive.com/turbine%40list.working-dogs.com/>
Problems?: [EMAIL PROTECTED]