[concurrency-interest] atomicity and volatile

Jason T. Greene jason.greene at redhat.com
Wed Mar 5 20:20:09 EST 2008


Dhanji R. Prasanna wrote:
> 
> 
> On Thu, Mar 6, 2008 at 11:14 AM, Bill Pugh <pugh at cs.umd.edu 
> <mailto:pugh at cs.umd.edu>> wrote:
> 
>     Yep.
> 
>     Don't do that.
> 
>     Use AtomicInteger instead. Or use some form of locking/synchronization.
> 
>  
> Gotcha, am writing about it so wanted a sanity check =)
> Thanks!

I recommend getting a copy of JCIP[1].

[1] http://www.javaconcurrencyinpractice.com/

-- 
Jason T. Greene
JBoss, a division of Red Hat


More information about the Concurrency-interest mailing list