#include <mitkThreadMasterWorker.h>
Inherits mitkObject.
Inheritance diagram for mitkThreadMaster:
Public Member Functions | |
int | GetThreadNumber () const |
void | DoTasks (unsigned long taskNumber, unsigned long startID=0, void *taskBag=NULL) |
mitkThreadMaster encapsulates a master of the master/worker model It creates workers when it is initialized either by a "worker creator" or by duplicating an existing "sample worker". If workers are created by duplication, the "sample worker" itself will be referenced as one of the workers. And then, the master creates corresponding threads to drive the workers.
|
When this function is called, threads are waken up to drive the workers. Tasks are dynamically scheduled, which means a worker will receive a new task immediately after it finishes its current one. The function won't return until all scheduled tasks are done.
|
|
Get the number of threads spawned.
|