diff options
| author | Steven Knight <knight@baldmt.com> | 2002-11-27 16:51:08 (GMT) |
|---|---|---|
| committer | Steven Knight <knight@baldmt.com> | 2002-11-27 16:51:08 (GMT) |
| commit | 4e5b73e5e77664749549fc5082550f82c4064604 (patch) | |
| tree | 31c9ed8a994e13380e34a0d069329c95c7821f29 /src/engine/SCons/Taskmaster.py | |
| parent | 8cfa91f6e3337cef06ea55d08389f2d83d1faee7 (diff) | |
| download | SCons-4e5b73e5e77664749549fc5082550f82c4064604.zip SCons-4e5b73e5e77664749549fc5082550f82c4064604.tar.gz SCons-4e5b73e5e77664749549fc5082550f82c4064604.tar.bz2 | |
Serialize calls to Node.prepare() (Anthony Roach)
Diffstat (limited to 'src/engine/SCons/Taskmaster.py')
| -rw-r--r-- | src/engine/SCons/Taskmaster.py | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/src/engine/SCons/Taskmaster.py b/src/engine/SCons/Taskmaster.py index bf2d918..a32def4 100644 --- a/src/engine/SCons/Taskmaster.py +++ b/src/engine/SCons/Taskmaster.py @@ -60,12 +60,19 @@ class Task: self.top = top self.node = node - def execute(self): - # This methods is called from multiple threads in - # a parallel build, so only do thread safe stuff here. - # Do thread unsafe stuff in executed() or failed(). + + def prepare(self): + """Called just before the task is executed.""" if self.targets[0].get_state() != SCons.Node.up_to_date: self.targets[0].prepare() + + def execute(self): + """Called to execute the task. + + This methods is called from multiple threads in + a parallel build, so only do thread safe stuff here. + Do thread unsafe stuff in prepare(), executed() or failed().""" + if self.targets[0].get_state() != SCons.Node.up_to_date: self.targets[0].build() def get_target(self): |
