diff options
author | mschaller <mschaller@google.com> | 2018-02-01 14:48:13 -0800 |
---|---|---|
committer | Copybara-Service <copybara-piper@google.com> | 2018-02-01 14:50:13 -0800 |
commit | 2f8fa6484cb10efb862d22009cecaaf97a85a4d0 (patch) | |
tree | 71b01b077baedf8d83a9486997be4b561ddb0d94 /src/main/java/com/google/devtools/build/skyframe/NodeEntryVisitor.java | |
parent | b3cdb052b399e26a5bb2d3b2e4efd09d17ce71ec (diff) |
Refactors ParallelEvaluator to support eval-wide exceptions.
Also clarifies a comment on preventNewEvaluations.
RELNOTES: None.
PiperOrigin-RevId: 184198568
Diffstat (limited to 'src/main/java/com/google/devtools/build/skyframe/NodeEntryVisitor.java')
-rw-r--r-- | src/main/java/com/google/devtools/build/skyframe/NodeEntryVisitor.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/main/java/com/google/devtools/build/skyframe/NodeEntryVisitor.java b/src/main/java/com/google/devtools/build/skyframe/NodeEntryVisitor.java index d528a830cd..5d1cd5f26b 100644 --- a/src/main/java/com/google/devtools/build/skyframe/NodeEntryVisitor.java +++ b/src/main/java/com/google/devtools/build/skyframe/NodeEntryVisitor.java @@ -106,8 +106,10 @@ class NodeEntryVisitor { /** * Stop any new evaluations from being enqueued. Returns whether this was the first thread to - * request a halt. If true, this thread should proceed to throw an exception. If false, another - * thread already requested a halt and will throw an exception, and so this thread can simply end. + * request a halt. + * + * <p>If called from within node evaluation, the caller may use the return value to determine + * whether it is responsible for throwing an exception to halt evaluation at the executor level. */ boolean preventNewEvaluations() { return preventNewEvaluations.compareAndSet(false, true); |