Skip to content

Commit 14a5f6f

Browse files
authored
Merge pull request SCons#4467 from acmorrow/parallel-cache-push-strawman
Parallel cache push strawman
2 parents e48e447 + e0272d2 commit 14a5f6f

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

CHANGES.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,9 @@ RELEASE VERSION/DATE TO BE FILLED IN LATER
6565
Python to 3.6, and it was not until Python 3.7 where `threading` became
6666
default supported. In practice, we expect most real world Python 3.6 deployments
6767
will have `threading` support enabled, so this will not be an issue.
68+
- CacheDir writes no longer happen within the taskmaster critical section,
69+
and therefore can run in parallel with both other CacheDir writes and the
70+
taskmaster DAG walk.
6871

6972
From Mats Wichmann:
7073
- Add support for Python 3.13 (as of alpha 2). So far only affects

RELEASE.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,8 @@ IMPROVEMENTS
6363
the new scheduler is now used for -j1 builds as well.
6464
NOTE: This should significantly improve SCons performance for larger parallel builds
6565
(Larger -j values)
66+
- CacheDir writes no longer happen within the taskmaster critical section, and therefore
67+
can run in parallel with both other CacheDir writes and the taskmaster DAG walk.
6668

6769

6870
PACKAGING

SCons/Taskmaster/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -244,6 +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+
for t in self.targets:
248+
t.push_to_cache()
247249
else:
248250
for t in cached_targets:
249251
t.cached = 1
@@ -299,8 +301,6 @@ def executed_with_callbacks(self) -> None:
299301
for side_effect in t.side_effects:
300302
side_effect.set_state(NODE_NO_STATE)
301303
t.set_state(NODE_EXECUTED)
302-
if not t.cached:
303-
t.push_to_cache()
304304
t.built()
305305
t.visited()
306306
if (not print_prepare and

0 commit comments

Comments
 (0)