[concurrency-interest] Synchronizing on AtomicBoolean safe?

Tim Peierls tim at peierls.net
Thu Jun 30 13:09:31 EDT 2005


Nikolai V. Chr. wrote:
> Okay, thanks for the answers. (allthough I did not understand everything..)

Sorry I wasn't clear. The answer to your original question is no: 
AtomicBoolean is not a drop-in replacement for SynchronizedBoolean and it 
doesn't have anything corresponding to getLock().

But could you explain why you think you need that synchronized block in the 
first place?

--tim



More information about the Concurrency-interest mailing list