From 8ad38ab09133b099f6a0b01e6e3df28e07b90de9 Mon Sep 17 00:00:00 2001 From: "Brian S. O'Neill" Date: Sat, 13 Dec 2008 04:30:49 +0000 Subject: Release upgrade lock if write lock not acquired. --- src/main/java/com/amazon/carbonado/repo/map/UpgradableLock.java | 1 + 1 file changed, 1 insertion(+) (limited to 'src/main') 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 { return false; } if (!tryLockForWrite(locker)) { + unlockFromUpgrade(locker); if ((timeout = unit.toNanos(timeout) - (System.nanoTime() - start)) <= 0) { return false; } -- cgit v1.2.3