Skip to content

Commit f27c3ca

Browse files
committed
cache push on any thread
1 parent e48e447 commit f27c3ca

File tree

3 files changed

+2
-9
lines changed

3 files changed

+2
-9
lines changed

SCons/Node/NodeTests.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1296,15 +1296,13 @@ def test_clear(self) -> None:
12961296
n.includes = 'testincludes'
12971297
n.Tag('found_includes', {'testkey':'testvalue'})
12981298
n.implicit = 'testimplicit'
1299-
n.cached = 1
13001299

13011300
x = MyExecutor()
13021301
n.set_executor(x)
13031302

13041303
n.clear()
13051304

13061305
assert n.includes is None, n.includes
1307-
assert n.cached == 0, n.cached
13081306
assert x.cleaned_up
13091307

13101308
def test_get_subst_proxy(self) -> None:

SCons/Node/__init__.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -588,7 +588,6 @@ def __init__(self) -> None:
588588
self.pseudo = False
589589
self.noclean = 0
590590
self.nocache = 0
591-
self.cached = 0 # is this node pulled from cache?
592591
self.always_build = None
593592
self.includes = None
594593
self.attributes = self.Attrs() # Generic place to stick information about the Node.
@@ -864,7 +863,6 @@ def clear(self) -> None:
864863
delattr(self, attr)
865864
except AttributeError:
866865
pass
867-
self.cached = 0
868866
self.includes = None
869867

870868
def clear_memoized_values(self) -> None:

SCons/Taskmaster/__init__.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -244,9 +244,8 @@ def execute(self):
244244
SCons.Warnings.warn(SCons.Warnings.CacheCleanupErrorWarning,
245245
"Failed copying all target files from cache, Error while attempting to remove file %s retrieved from cache: %s" % (t.get_internal_path(), e))
246246
self.targets[0].build()
247-
else:
248-
for t in cached_targets:
249-
t.cached = 1
247+
for t in self.targets:
248+
t.push_to_cache()
250249
except SystemExit:
251250
exc_value = sys.exc_info()[1]
252251
raise SCons.Errors.ExplicitExit(self.targets[0], exc_value.code)
@@ -299,8 +298,6 @@ def executed_with_callbacks(self) -> None:
299298
for side_effect in t.side_effects:
300299
side_effect.set_state(NODE_NO_STATE)
301300
t.set_state(NODE_EXECUTED)
302-
if not t.cached:
303-
t.push_to_cache()
304301
t.built()
305302
t.visited()
306303
if (not print_prepare and

0 commit comments

Comments
 (0)