aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--src/main/java/com/google/devtools/build/lib/concurrent/AbstractQueueVisitor.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/concurrent/AbstractQueueVisitor.java b/src/main/java/com/google/devtools/build/lib/concurrent/AbstractQueueVisitor.java
index c7ba0f7508..fe96b61be2 100644
--- a/src/main/java/com/google/devtools/build/lib/concurrent/AbstractQueueVisitor.java
+++ b/src/main/java/com/google/devtools/build/lib/concurrent/AbstractQueueVisitor.java
@@ -121,7 +121,7 @@ public class AbstractQueueVisitor {
* important to save the first one as it may be more informative than a
* subsequent one, and this is not a performance-critical path.
*/
- private Throwable unhandled = null;
+ private volatile Throwable unhandled = null;
/**
* An uncaught exception when submitting a job to the ThreadPool is catastrophic, and usually
@@ -186,7 +186,9 @@ public class AbstractQueueVisitor {
private final boolean ownThreadPool;
/**
- * Flag used to record when all threads were killed by failed action execution
+ * Flag used to record when all threads were killed by failed action execution.
+ *
+ * <p>May only be accessed in a synchronized block.
*/
private boolean jobsMustBeStopped = false;