[concurrency-interest] AtomicReferenceFieldUpdater vs Unsafe

Rémi Forax forax at univ-mlv.fr
Mon Nov 28 09:53:10 EST 2011


On 11/28/2011 03:35 PM, ?iktor ?lang wrote:
>
>
> On Mon, Nov 28, 2011 at 3:24 PM, Vitaly Davidovich <vitalyd at gmail.com 
> <mailto:vitalyd at gmail.com>> wrote:
>
>     Relocating these methods to a "proper" JDK class will imply that
>     it's ok to use them in normal operation, which I don't think is
>     the case and hence, to me, unsafe sounds like the right place.
>
> It should probably be java.lang.Unsafe instead of sun.misc.Unsafe though

They are as unsafe as calling tryLock() and unlock() on a Lock,
so they can be in j.l.Thread as static methods.

>
>     Why not have the 3rd party fix their code? I realize that won't
>     help in the immediate situation, but that's actually the right
>     solution here.
>
>     $.02
>
>     Vitaly
>

Rémi

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://cs.oswego.edu/pipermail/concurrency-interest/attachments/20111128/d1deecbe/attachment-0001.html>


More information about the Concurrency-interest mailing list