Public Member Functions | |
__init__ (name=None) | |
name () | |
Method for querying the task engine's name. | |
spawn (task, args, kwargs) | |
Method used to queue a task to the task engine. | |
run () | |
The task engine main routine. | |
shutdown (tmo=2.0) | |
Method for shutting down the task engine. |
A task engine is a thread that polls a task queue and runs tasks found on the queue. Tasks are functions or class methods accompanied with their arguments and keyword arguments. Each task must run to completion before the next task is pulled from the queue. Returning a return value from the task to the caller is currently not supported (easy to add, if the need arises). The queue is a FIFO queue and there is currently no way to jam a task to the head of the queue.
Definition at line 22 of file taskEngine.py.
|
Method for querying the task engine's name.
|
|
The task engine main routine. This method is invoked by the Thread class and should be considered 'protected'. Do not call it. |
|
Method for shutting down the task engine. This method blocks (with a timeout) until the task engine has exited. It makes no sense to spawn this method to the task engine since it waits for the task engine to exit.
|
|
Method used to queue a task to the task engine.
|