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.py19
1 files changed, 14 insertions, 5 deletions
diff --git a/src/engine/SCons/Taskmaster.py b/src/engine/SCons/Taskmaster.py
index 8fca4a9..29e48ac 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
@@ -27,10 +27,10 @@ import sys
__doc__ = """
Generic Taskmaster module for the SCons build engine.
=====================================================
-
+
This module contains the primary interface(s) between a wrapping user
interface and the SCons build engine. There are two key classes here:
-
+
Taskmaster
----------
This is the main engine for walking the dependency graph and
@@ -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 e724ae812eb96f4858a132f5b8c769724744faf6 2019-07-21 00:04:47 bdeegan"
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)
@@ -542,7 +551,7 @@ class Task(object):
try:
exc_type, exc_value, exc_traceback = exc
except ValueError:
- exc_type, exc_value = exc
+ exc_type, exc_value = exc # pylint: disable=unbalanced-tuple-unpacking
exc_traceback = None
# raise exc_type(exc_value).with_traceback(exc_traceback)