|
Elm
2
ELM is a library providing generic data structures, OS-independent interface, plugins and XML.
|
21 #ifndef ELM_SYS_JOBSCHEDULER_H_
22 #define ELM_SYS_JOBSCHEDULER_H_
24 #include <elm/sys/Thread.h>
26 namespace elm {
namespace sys {
38 template <
class T,
class I>
42 virtual Job *
next(
void) {
if(i.ended())
return 0;
else { T *r = i.item(); i.next();
return r; } }
67 virtual void run(
void);
void setThreadCount(int count)
Definition: sys_JobScheduler.cpp:148
Definition: JobScheduler.h:31
void start(void)
Definition: sys_JobScheduler.cpp:158
int threadCount(void) const
Definition: JobScheduler.h:58
Definition: util_WAHVector.cpp:157
IteratorProducer(const I &iter)
Definition: JobScheduler.h:41
void stop(void)
Definition: sys_JobScheduler.cpp:194
virtual void harvest(Job *job)
Definition: JobScheduler.h:35
JobScheduler(void)
Definition: sys_JobScheduler.cpp:95
Definition: JobScheduler.h:49
virtual Job * next(void)=0
virtual void harvest(T *job)
Definition: JobScheduler.h:44
~JobScheduler(void)
Definition: sys_JobScheduler.cpp:112
virtual Job * next(void)
Definition: JobScheduler.h:42
Definition: JobScheduler.h:39
int count(const C &c, const P &p)
Definition: util.h:65
Definition: JobScheduler.h:28
void setProducer(JobProducer &producer)
Definition: sys_JobScheduler.cpp:132
virtual void harvest(Job *job)
Definition: JobScheduler.h:43
JobProducer & producer(void) const
Definition: JobScheduler.h:56
virtual ~JobProducer(void)
Definition: JobScheduler.h:33