diff options
author | 2016-08-30 13:28:25 +0000 | |
---|---|---|
committer | 2016-08-31 08:10:10 +0000 | |
commit | 44ba39b77a0f20cc6a763ebdc328dfeb4fe82f34 (patch) | |
tree | c7a0254eb658eb2b41e8cf5da64390e941782a80 | |
parent | a336c48ca61d0a2d5b2c4666a12abff92bfbf101 (diff) |
ResourceManager shouldn't set threadLocked to true if resource acquisition got interrupted.
--
MOS_MIGRATED_REVID=131703083
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/actions/ResourceManager.java | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/actions/ResourceManager.java b/src/main/java/com/google/devtools/build/lib/actions/ResourceManager.java index 9d5edc3153..2f0483e7eb 100644 --- a/src/main/java/com/google/devtools/build/lib/actions/ResourceManager.java +++ b/src/main/java/com/google/devtools/build/lib/actions/ResourceManager.java @@ -227,14 +227,14 @@ public class ResourceManager { } } throw e; - } finally { - threadLocked.set(resources != ResourceSet.ZERO); - acquired(owner); + } - // Profile acquisition only if it waited for resource to become available. - if (latch != null) { - p.complete(); - } + threadLocked.set(resources != ResourceSet.ZERO); + acquired(owner); + + // Profile acquisition only if it waited for resource to become available. + if (latch != null) { + p.complete(); } return new ResourceHandle(this, owner, resources); |