Hi,

Sounds OK to me.  Just on the same note.  Shouldn't we synchronize on object
creation as well, for in case a threads starts to create a new object and before
it finishes a second thread asks for the same object...  This will probably not
cause a problem except that the second thread starts the initialization  process
from scratch again.  This could take a lot of time - which is exactly the reason
we cache objects in the first place.

~ Leon

> Hi,
>
> I'm working on the refreshable cache we talked about last week.  I was
> just thinking that it might not be thread safe if the
> RefreshableCachedObject was in refresh() while a request thread tried to
> access the contents.  So I think it would be good to synchronize on this
> in RefreshableCachedObject when it calls contents.refresh().
>
> Does that sound like it will work?
>
> -Nissim





------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Search: <http://www.mail-archive.com/turbine%40list.working-dogs.com/>
Problems?:           [EMAIL PROTECTED]

Reply via email to