[concurrency-interest] Thread safety of WeakReference .get() method?
vitalyd at gmail.com
Wed Aug 8 09:00:39 EDT 2012
You will need to treat WeakReference as any other non-threadsafe class and
provide the necessary happens-before edges if you want to share the
instance amongst java threads.
Sent from my phone
On Aug 8, 2012 8:54 AM, "Raph Frank" <raphfrk at gmail.com> wrote:
> So, if I create a weak reference to an object when it is created, it
> is still safe to use (well no less safe anyway).
> Sounds like this issue occurs if the last reference to an object is
> released by one thread and the WeakReference.get() is checked from
> Concurrency-interest mailing list
> Concurrency-interest at cs.oswego.edu
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Concurrency-interest