Elm  1.0
ELM is a library providing generic data structures, OS-independent interface, plugins and XML.
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
elm::sys::JobScheduler Class Reference

#include <elm/sys/JobScheduler.h>

+ Inheritance diagram for elm::sys::JobScheduler:

Public Member Functions

 JobScheduler (void) throw (SystemException)
 
 JobScheduler (JobProducer &producer) throw (SystemException)
 
 ~JobScheduler (void)
 
JobProducerproducer (void) const
 
void setProducer (JobProducer &producer)
 
int threadCount (void) const
 
void setThreadCount (int count)
 
void start (void)
 
void stop (void)
 

Detailed Description

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.

Constructor & Destructor Documentation

elm::sys::JobScheduler::JobScheduler ( void  )
throw (SystemException
)

Constructor without producer.

Exceptions
SystemExceptionLack of OS resources.
elm::sys::JobScheduler::JobScheduler ( JobProducer producer)
throw (SystemException
)

Constructor.

Parameters
producerProducer to use.
Exceptions
SystemExceptionLack of OS resources.
elm::sys::JobScheduler::~JobScheduler ( void  )

Member Function Documentation

JobProducer & elm::sys::JobScheduler::producer ( void  ) const

Get the current producer.

Returns
Current producer.

Referenced by setProducer().

void elm::sys::JobScheduler::setProducer ( JobProducer producer)

Set the current producer.

Parameters
producerProducer to set.

References producer().

void elm::sys::JobScheduler::setThreadCount ( int  count)

Set the number of threads.

Parameters
countNumber of threads.
void elm::sys::JobScheduler::start ( void  )

Start to process the jobs. This function will only when all jobs has been processed or a call to stop() has been performed.

References elm::sys::Thread::make().

void elm::sys::JobScheduler::stop ( void  )

Stop the job processing.

int elm::sys::JobScheduler::threadCount ( void  ) const

Get the number of used threads.


The documentation for this class was generated from the following files: