summaryrefslogtreecommitdiffstats
path: root/SCons/Environment.py
diff options
context:
space:
mode:
authorWilliam Deegan <bill@baddogconsulting.com>2021-01-16 02:12:46 (GMT)
committerWilliam Deegan <bill@baddogconsulting.com>2021-01-16 02:12:46 (GMT)
commite66a758ad087334076fb098993b7ee67ebd4dc61 (patch)
tree03f3c2ba0dba411d59c9aba854a145f563727305 /SCons/Environment.py
parent988b86a76317311d09ac10f58bb55a8e267c7a36 (diff)
downloadSCons-e66a758ad087334076fb098993b7ee67ebd4dc61.zip
SCons-e66a758ad087334076fb098993b7ee67ebd4dc61.tar.gz
SCons-e66a758ad087334076fb098993b7ee67ebd4dc61.tar.bz2
New solution to issue described in PR 3114. This should resolve an issue when creating a new cachedir and building -j > 1 which can cause a race condition
Diffstat (limited to 'SCons/Environment.py')
-rw-r--r--SCons/Environment.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/SCons/Environment.py b/SCons/Environment.py
index 312530a..89bfa76 100644
--- a/SCons/Environment.py
+++ b/SCons/Environment.py
@@ -2000,6 +2000,11 @@ class Base(SubstitutionEnvironment):
path = self.subst(path)
self._CacheDir_path = path
+ # Now initialized the CacheDir and prevent a race condition which can
+ # happen when there's no existing cache dir and you are building with
+ # multiple threads, but initializing it before the task walk starts
+ self.get_CacheDir()
+
def Clean(self, targets, files):
global CleanTargets
tlist = self.arg2nodes(targets, self.fs.Entry)