summaryrefslogtreecommitdiff
path: root/src/engine/SCons/Taskmaster.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/engine/SCons/Taskmaster.py')
-rw-r--r--src/engine/SCons/Taskmaster.py13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/engine/SCons/Taskmaster.py b/src/engine/SCons/Taskmaster.py
index 8fca4a9..d8d8224 100644
--- a/src/engine/SCons/Taskmaster.py
+++ b/src/engine/SCons/Taskmaster.py
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2001 - 2017 The SCons Foundation
+# Copyright (c) 2001 - 2019 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -54,7 +54,7 @@ __doc__ = """
target(s) that it decides need to be evaluated and/or built.
"""
-__revision__ = "src/engine/SCons/Taskmaster.py rel_3.0.0:4395:8972f6a2f699 2017/09/18 12:59:24 bdbaddog"
+__revision__ = "src/engine/SCons/Taskmaster.py 103260fce95bf5db1c35fb2371983087d85dd611 2019-07-13 18:25:30 bdbaddog"
from itertools import chain
import operator
@@ -470,14 +470,23 @@ class Task(object):
pending_children.discard(t)
for p in t.waiting_parents:
parents[p] = parents.get(p, 0) + 1
+ t.waiting_parents = set()
for t in targets:
if t.side_effects is not None:
for s in t.side_effects:
if s.get_state() == NODE_EXECUTING:
s.set_state(NODE_NO_STATE)
+
+ # The side-effects may have been transferred to
+ # NODE_NO_STATE by executed_with{,out}_callbacks, but was
+ # not taken out of the waiting parents/pending children
+ # data structures. Check for that now.
+ if s.get_state() == NODE_NO_STATE and s.waiting_parents:
+ pending_children.discard(s)
for p in s.waiting_parents:
parents[p] = parents.get(p, 0) + 1
+ s.waiting_parents = set()
for p in s.waiting_s_e:
if p.ref_count == 0:
self.tm.candidates.append(p)