|
Version_1_5
Version 1.5 release notes.
Notes Version 1.5 release notesEver since release of 1.0 back in 2004 people constantly asked me to change <textarea> to <pre> and I have always avoided doing that because of the "poor" XML support inside <pre> tags. This is now a reality and both are supported. Please see this page for more technical details on the issue. In project related news, I have moved the whole thing on Google code and using Google groups for discussions and questions. From now on, please post all questions there. Any technical questions email directly to me will be ignored. What's new
DownloadYou can grab latest version on the Downloads page. |
► Sign in to add a comment
final boolean nonfairTryAcquire(int acquires) {
}final boolean nonfairTryAcquire(int acquires) {
final Thread current = Thread.currentThread(); int c = getState(); if (c == 0) { if (compareAndSetState(0, acquires)) { setExclusiveOwnerThread(current); return true; } } else if (current == getExclusiveOwnerThread()) { int nextc = c + acquires; if (nextc < 0) // overflow throw new Error("Maximum lock count exceeded"); setState(nextc); return true; } return false; }