aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorGravatar Janak Ramakrishnan <janakr@google.com>2015-11-12 18:45:14 +0000
committerGravatar Lukacs Berki <lberki@google.com>2015-11-13 10:22:32 +0000
commit4bbc2676910f95e584c4bfbdbbb02c4b59bd7d12 (patch)
treedc2800f2a024ef61302efa126139ab04e6ef66c2 /src
parent8d4f78d7ab9f16ed22f42e656992eb47401cdcf4 (diff)
Put NodeEntry in Supplier<SkyValue> passed to EvaluationProgressReceiver so it's readily accessible in the program.
-- MOS_MIGRATED_REVID=107698784
Diffstat (limited to 'src')
-rw-r--r--src/main/java/com/google/devtools/build/skyframe/ParallelEvaluator.java4
1 files changed, 3 insertions, 1 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 c993f0caf9..af774c6607 100644
--- a/src/main/java/com/google/devtools/build/skyframe/ParallelEvaluator.java
+++ b/src/main/java/com/google/devtools/build/skyframe/ParallelEvaluator.java
@@ -599,7 +599,9 @@ public final class ParallelEvaluator implements Evaluator {
// by the Preconditions check above, and was not actually changed this run -- when it was
// written above, its version stayed below this update's version, so its value remains the
// same as before.
- progressReceiver.evaluated(skyKey, Suppliers.ofInstance(value),
+ // We use a SkyValueSupplier here because it keeps a reference to the entry, allowing for
+ // the receiver to be confident that the entry is readily accessible in memory.
+ progressReceiver.evaluated(skyKey, new SkyValueSupplier(primaryEntry),
valueVersion.equals(graphVersion) ? EvaluationState.BUILT : EvaluationState.CLEAN);
}
signalValuesAndEnqueueIfReady(enqueueParents ? visitor : null, reverseDeps, valueVersion);