#include <Worker.h>
Inheritance diagram for Worker:

Public Methods | |
| Worker (TaskQueue q) throw (Synchronization_Exception) | |
| virtual | ~Worker () throw () |
| virtual void | kill () throw (Synchronization_Exception) |
| virtual bool | isKilled () throw () |
| virtual void | run () throw () |
Protected Types | |
| typedef Q * | TaskQueue |
| Typedef. | |
Protected Methods | |
| void | finished (Runnable *task) |
Protected Attributes | |
| TaskQueue | _taskQueue |
| TaskQueue. | |
| bool | _canceled |
| Cancel flag. | |
In addition the template provides specializations for task consuming or task reading workers. A consuming worker destroys tasks it has executed, otherwise it simply executes the task and makes no attempt to destroy that task.
|
|
Create an AsyncWorker associated with a TaskQueue |
|
|
Destroy the AsyncWorker |
|
|
As each task is completed, it is passed into this method to properly deal with its completion. This function will destroy the taks objects of a consuming worker, otherwise it has no effect.
|
|
|
Check the internal flag to see if this Worker has been killed; or marked as no longer usable
Reimplemented from Thread. |
|
|
Mark the thread as killed w/o actuallying kill()ing it and therefore w/o interefering with any task already executing Reimplemented from Thread. |
|
|
Tasks will be executed and removed from the queue. Wether or not those tasks are deleted depends on the template parameter. Reimplemented from Thread. |
1.2.15