aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorGravatar Philipp Wollermann <philwo@google.com>2016-08-30 13:28:25 +0000
committerGravatar Klaus Aehlig <aehlig@google.com>2016-08-31 08:10:10 +0000
commit44ba39b77a0f20cc6a763ebdc328dfeb4fe82f34 (patch)
treec7a0254eb658eb2b41e8cf5da64390e941782a80 /src
parenta336c48ca61d0a2d5b2c4666a12abff92bfbf101 (diff)
ResourceManager shouldn't set threadLocked to true if resource acquisition got interrupted.
-- MOS_MIGRATED_REVID=131703083
Diffstat (limited to 'src')
-rw-r--r--src/main/java/com/google/devtools/build/lib/actions/ResourceManager.java14
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);