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

Class Serial


This class is used to execute tasks in series, and is more efficient than Parallel, but is only appropriate for non-parallel builds. Only one instance of this class should be in existence at a time.

This class is not thread safe.


Method Summary
  __init__(self, taskmaster)
Create a new serial job given a taskmaster.
  cleanup(self)
  start(self)
Start the job.

Method Details

__init__(self, taskmaster)
(Constructor)

Create a new serial job given a taskmaster.

The taskmaster's next_task() method should return the next task that needs to be executed, or None if there are no more tasks. The taskmaster's executed() method will be called for each task when it is successfully executed or failed() will be called if it failed to execute (e.g. execute() raised an exception).

start(self)

Start the job. This will begin pulling tasks from the taskmaster and executing them, and return when there are no more tasks. If a task fails to execute (i.e. execute() raises an exception), then the job will stop.


Generated by Epydoc 2.1 on Wed Dec 12 09:39:31 2007 http://epydoc.sf.net