Hi, Is there any case which "synchronized" could be refactored to use java.util.concurrent.locks.ReentrantReadWriteLock?
If so, there mighe be some performance improvement through shared Read Lock. My two cents, Jian On 5/16/07, Newcomb, Michael-P57487 <[EMAIL PROTECTED]> wrote:
"There's no fundamental reason, however, why a JVM couldn't eventually apply such optimizations to ReentrantLock." As Trustin suggested, synchronized is fine for simple locking, but don't let performance guide your decision to use the more advanced locks... Michael > -----Original Message----- > From: Trustin Lee [mailto:[EMAIL PROTECTED] > Sent: Wednesday, May 16, 2007 2:46 AM > To: [email protected] > Subject: Interesting blog entry about synchronized vs ReentrantLock > > Hi, > > I found an interesting blog entry: > > http://blogs.sun.com/dave/entry/java_util_concurrent_reentrantlock_vs > > It seems like Sun engineers have done a lot of optimization > on 'synchronized' keyword. I just have been thinking that > ReentrantLock performs better than synchronized like this > article points out: > > http://www-128.ibm.com/developerworks/library/j-jtp10264/ > > So, should we stick to synchronized as long as we don't need > advanced features of ReentrantLock for MINA? > > Trustin > -- > what we call human nature is actually human habit > -- > http://gleamynode.net/ > -- > PGP Key ID: 0x0255ECA6 >
