summaryrefslogtreecommitdiffstats
path: root/src/build.cc
diff options
context:
space:
mode:
authorScott Graham <scottmg@chromium.org>2015-04-23 22:54:28 (GMT)
committerScott Graham <scottmg@chromium.org>2015-04-23 22:56:09 (GMT)
commit6652258c2fa510f043d32be95ef4c44eaa2800dc (patch)
tree93fc280de8aaadb4254604cf886800467aa9e9f1 /src/build.cc
parentb2b8f3a12d3323c4273aa63460f482d6f7f03211 (diff)
downloadNinja-6652258c2fa510f043d32be95ef4c44eaa2800dc.zip
Ninja-6652258c2fa510f043d32be95ef4c44eaa2800dc.tar.gz
Ninja-6652258c2fa510f043d32be95ef4c44eaa2800dc.tar.bz2
Fix pool use count going unbalanced
Diffstat (limited to 'src/build.cc')
-rw-r--r--src/build.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/build.cc b/src/build.cc
index ccdb37f..f14831e 100644
--- a/src/build.cc
+++ b/src/build.cc
@@ -411,7 +411,9 @@ void Plan::NodeFinished(Node* node) {
ScheduleWork(*oe);
} else {
// We do not need to build this edge, but we might need to build one of
- // its dependents.
+ // its dependents. Make sure the pool schedules it before it's finished
+ // otherwise the pool use count may be invalid.
+ (*oe)->pool()->EdgeScheduled(**oe);
EdgeFinished(*oe);
}
}