Elm
2
ELM is a library providing generic data structures, OS-independent interface, plugins and XML.
|
#include <elm/sys/JobScheduler.h>
Public Member Functions | |
JobScheduler (void) | |
JobScheduler (JobProducer &producer) | |
~JobScheduler (void) | |
JobProducer & | producer (void) const |
void | setProducer (JobProducer &producer) |
int | threadCount (void) const |
void | setThreadCount (int count) |
void | start (void) |
void | stop (void) |
The job scheduler distributes a list of jobs on several thread until the jobs are ended.Thread management is transparent for the user and job result harvesting in exclusive way is also supported by the scheduler.
To get the list of jobs, an object extending JobProducer must be provided.
JobScheduler | ( | void | ) |
Constructor without producer.
SystemException | Lack of OS resources. |
JobScheduler | ( | JobProducer & | producer | ) |
~JobScheduler | ( | void | ) |
|
inline |
void setProducer | ( | JobProducer & | producer | ) |
void setThreadCount | ( | int | count | ) |
Start to process the jobs. This function will only when all jobs has been processed or a call to stop() has been performed.
References Thread::make().
|
inline |
Get the number of used threads.