diff options
author | Janak Ramakrishnan <janakr@google.com> | 2015-10-10 00:14:30 +0000 |
---|---|---|
committer | Han-Wen Nienhuys <hanwen@google.com> | 2015-10-12 08:36:20 +0000 |
commit | 00ef6615d72104cd69234d96733cb11abe534035 (patch) | |
tree | 4aa432c98a9646d6a36a8fc938190379e0a99ad3 /src/main/java/com | |
parent | 441dcb1ed150d40cc27e6e86ebb60754e44ba89f (diff) |
Clear interrupt bit before processing any error thrown by SkyFunction during error bubbling.
--
MOS_MIGRATED_REVID=105102597
Diffstat (limited to 'src/main/java/com')
-rw-r--r-- | src/main/java/com/google/devtools/build/skyframe/ParallelEvaluator.java | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/main/java/com/google/devtools/build/skyframe/ParallelEvaluator.java b/src/main/java/com/google/devtools/build/skyframe/ParallelEvaluator.java index 1e555e8e47..156e93e77c 100644 --- a/src/main/java/com/google/devtools/build/skyframe/ParallelEvaluator.java +++ b/src/main/java/com/google/devtools/build/skyframe/ParallelEvaluator.java @@ -1334,7 +1334,14 @@ public final class ParallelEvaluator implements Evaluator { // This build is only to check if the parent node can give us a better error. We don't // care about a return value. factory.compute(parent, env); + } catch (InterruptedException interruptedException) { + // Do nothing. + // This throw happens if the builder requested the failed node, and then checked the + // interrupted state later -- getValueOrThrow sets the interrupted bit after the failed + // value is requested, to prevent the builder from doing too much work. } catch (SkyFunctionException builderException) { + // Clear interrupted status. We're not listening to interrupts here. + Thread.interrupted(); ReifiedSkyFunctionException reifiedBuilderException = new ReifiedSkyFunctionException(builderException, parent); if (reifiedBuilderException.getRootCauseSkyKey().equals(parent)) { @@ -1344,11 +1351,6 @@ public final class ParallelEvaluator implements Evaluator { env.buildEvents(/*missingChildren=*/true))); continue; } - } catch (InterruptedException interruptedException) { - // Do nothing. - // This throw happens if the builder requested the failed node, and then checked the - // interrupted state later -- getValueOrThrow sets the interrupted bit after the failed - // value is requested, to prevent the builder from doing too much work. } finally { // Clear interrupted status. We're not listening to interrupts here. Thread.interrupted(); |