Description
This issue was originally created at: 2009-12-09 09:37:10.
This issue was reported by: coppro
.
coppro said at 2009-12-09 09:37:10
There ought to be a means by which a target can be forced to build in a single-threaded environment, even if '-j' is used. Even better, each target could have a set number of maximum threads, which would be the most threads that could be active while a given target is being built.
In my case, I want this because while most of my build is greatly helped by multi-threadedness, there is one file in particular that causes massive memory strain while being built. Being able to say
MaxThreads(target, 1)
would mean that there's a significantly less chance of the OOM killer being invoked, and increases the speed and reliability of the builds without having to invoke Scons more than one time.
gregnoel said at 2010-01-18 15:37:48
Bug party triage. Interesting idea, and would solve several problems. On the other hand, it would require a major reworking of the taskmaster, which isn't going to happen soon. Don't lose the issue; push it out to be reconsidered at a future date.
In the meantime, judicious use of
SideEffect()
can usually alleviate many of these problems, even if the solution isn't perfect.