Runner.py: Task scheduling and execution
Wait for free tasks if there are at least GAP * njobs in queue
Task consumers belong to a pool of workers
They wait for tasks in the queue and then use task.process(...)
Loop over the tasks to execute
Pool of task consumer objects
Return a task consumer to the thread pool waflib.Runner.pool
Schedule the tasks obtained from the build context for execution.
The initialization requires a build context reference for computing the total number of jobs.
Number of consumers in the pool
Amount of tasks processed
Error flag to stop the build
Tasks that could not be executed
Task iterator which must give groups of parallelizable tasks when calling next()
Flag to indicate that tasks have been executed, and that the build cache must be saved (call waflib.Build.BuildContext.store())
A task cannot be executed at this point, put it in the list waflib.Runner.Parallel.frozen.
Tasks may be added dynamically during the build by binding them to the task waflib.Task.TaskBase.more_tasks
Obtain one task returned from the task consumers, and update the task count. Add more tasks if necessary through waflib.Runner.Parallel.add_more_tasks.
Called when a task cannot be executed. The flag waflib.Runner.Parallel.stop is set, unless the build is executed with:
$ waf build -k