diff options
author | Brian S. O'Neill <bronee@gmail.com> | 2008-12-13 04:30:49 +0000 |
---|---|---|
committer | Brian S. O'Neill <bronee@gmail.com> | 2008-12-13 04:30:49 +0000 |
commit | 8ad38ab09133b099f6a0b01e6e3df28e07b90de9 (patch) | |
tree | cf42f9af1f2a80e0f01d50306ed8c35c223c4c19 /src/main/java/com | |
parent | a8e3ebeece7c811b156b47aa789527bf5bb55b56 (diff) |
Release upgrade lock if write lock not acquired.
Diffstat (limited to 'src/main/java/com')
-rw-r--r-- | src/main/java/com/amazon/carbonado/repo/map/UpgradableLock.java | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/main/java/com/amazon/carbonado/repo/map/UpgradableLock.java b/src/main/java/com/amazon/carbonado/repo/map/UpgradableLock.java index 60c9bfa..1992515 100644 --- a/src/main/java/com/amazon/carbonado/repo/map/UpgradableLock.java +++ b/src/main/java/com/amazon/carbonado/repo/map/UpgradableLock.java @@ -475,6 +475,7 @@ class UpgradableLock<L> { return false;
}
if (!tryLockForWrite(locker)) {
+ unlockFromUpgrade(locker);
if ((timeout = unit.toNanos(timeout) - (System.nanoTime() - start)) <= 0) {
return false;
}
|