[concurrency-interest] Is it still ok to use synchronized after all these years?
fslzdd at gmail.com
Fri Nov 12 21:42:46 EST 2010
I thought Tim and Yao shared good points. Brian Goetz summarizes the usage
of ReentrantLock here:
"Use it when you need something it provides that synchronized doesn't, like
timed lock waits, interruptible lock waits, non-block-structured locks,
multiple condition variables, or lock polling. ReentrantLock also has
2010/11/13 Ashwin Jayaprakash <ashwin.jayaprakash at gmail.com>
> I was wondering if it is still ok to use the "synchronized" keyword instead
> of ReentrantLock where it is convenient.
> Or is it thought of as an anachronism?
> Does synchronized still have a better internal implementation over
> j.u.c.Lock as this old blog entry says -
> http://blogs.sun.com/dave/entry/java_util_concurrent_reentrantlock_vs ?
> Ashwin Jayaprakash.
> PS: Doug Lea - if you are reading this, I hope you will continue to make
> your awesome contributions to the JDK! I can't imagine what it would be like
> without the j.u.c code.
> Concurrency-interest mailing list
> Concurrency-interest at cs.oswego.edu
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Concurrency-interest