diff options
author | Mark Schaller <mschaller@google.com> | 2015-11-24 15:45:40 +0000 |
---|---|---|
committer | Philipp Wollermann <philwo@google.com> | 2015-11-25 10:00:13 +0000 |
commit | c6ed6136c563f9836670ff740388e7b6fcdf8c83 (patch) | |
tree | 41d1cab3d0598ff72a7ad82fa0ca358cd5849a5a /src/main/java/com/google/devtools/build/skyframe/EagerInvalidator.java | |
parent | 5b3290016a29fa2cf01a68cd0025d8982a432882 (diff) |
Make support for interruptibility optional during dirtying
Reduces the amount of work needed when interruptibility isn't needed.
--
MOS_MIGRATED_REVID=108611609
Diffstat (limited to 'src/main/java/com/google/devtools/build/skyframe/EagerInvalidator.java')
-rw-r--r-- | src/main/java/com/google/devtools/build/skyframe/EagerInvalidator.java | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/src/main/java/com/google/devtools/build/skyframe/EagerInvalidator.java b/src/main/java/com/google/devtools/build/skyframe/EagerInvalidator.java index cb2a8ccf66..49bcfa0165 100644 --- a/src/main/java/com/google/devtools/build/skyframe/EagerInvalidator.java +++ b/src/main/java/com/google/devtools/build/skyframe/EagerInvalidator.java @@ -88,12 +88,18 @@ public final class EagerInvalidator { EvaluationProgressReceiver invalidationReceiver, InvalidationState state, DirtyKeyTracker dirtyKeyTracker, - ForkJoinPool forkJoinPool) { + ForkJoinPool forkJoinPool, + boolean supportInterruptions) { state.update(diff); return state.isEmpty() ? null : new DirtyingNodeVisitor( - graph, invalidationReceiver, state, dirtyKeyTracker, forkJoinPool); + graph, + invalidationReceiver, + state, + dirtyKeyTracker, + forkJoinPool, + supportInterruptions); } /** @@ -126,11 +132,18 @@ public final class EagerInvalidator { EvaluationProgressReceiver invalidationReceiver, InvalidationState state, DirtyKeyTracker dirtyKeyTracker, - ForkJoinPool forkJoinPool) + ForkJoinPool forkJoinPool, + boolean supportInterruptions) throws InterruptedException { DirtyingNodeVisitor visitor = createInvalidatingVisitorIfNeeded( - graph, diff, invalidationReceiver, state, dirtyKeyTracker, forkJoinPool); + graph, + diff, + invalidationReceiver, + state, + dirtyKeyTracker, + forkJoinPool, + supportInterruptions); if (visitor != null) { visitor.run(); } |