Thursday, September 24, 2009

Reentrant lock release issue

don't use shared ReentrantLock before jdk versions hs10(b05), 6u4(b03) , 7(b05); otherwise you can get

java.lang.IllegalMonitorStateException
at java.util.concurrent.locks.ReentrantLock$Sync.tryRelease(ReentrantLock.java:125)
at java.util.concurrent.locks.AbstractQueuedSynchronizer.release(AbstractQueuedSynchronizer.java:1137)

on unlock.

No comments: