Package SCons :: Module Job :: Class Jobs
[hide private]
[frames] | no frames]

Class Jobs

source code

An instance of this class initializes N jobs, and provides methods for starting, stopping, and waiting on all N jobs.

Instance Methods [hide private]
 
__init__(self, num, taskmaster)
create 'num' jobs using the given taskmaster.
source code
 
run(self)
run the job
source code
 
cleanup(self) source code
Method Details [hide private]

__init__(self, num, taskmaster)
(Constructor)

source code 

create 'num' jobs using the given taskmaster.

If 'num' is 1 or less, then a serial job will be used, otherwise a parallel job with 'num' worker threads will be used.

The 'num_jobs' attribute will be set to the actual number of jobs allocated. If more than one job is requested but the Parallel class can't do it, it gets reset to 1. Wrapping interfaces that care should check the value of 'num_jobs' after initialization.