class documentation
class BaseWorker(threading.Thread, object):
Base worker class for worker pools.
Users of a worker pool must override RunTask in a subclass.
| Method | __init__ |
Constructor for BaseWorker thread. |
| Method | |
Returns the priority of the current task. |
| Method | run |
Main thread function. |
| Method | |
Function called to start a task. |
| Method | |
Sets the name of the current task. |
| Method | |
Returns whether this worker should terminate. |
| Instance Variable | name |
Undocumented |
| Instance Variable | pool |
Undocumented |
| Method | _ |
Returns the order and task ID of the current task. |
| Method | _ |
Returns whether this worker is currently running a task. |
| Instance Variable | _current |
Undocumented |
| Instance Variable | _worker |
Undocumented |
Constructor for BaseWorker thread.
| Parameters | |
| pool | the parent worker pool |
| worker | identifier for this worker |
Sets the name of the current task.
Should only be called from within RunTask.
| Parameters | |
| taskname:string | Task's name |