Class WorkFarm
The TimerQueue manage a job queue served by a
farm of processes. Each job in the queue is serve by one of the
farm process in the order in which they were posted. The size of
the farm is specified at creation time.
Public type
class Job;
- WorkFarm::Job are the job managed
by the WorkFarm object.
-
Constructor and destructor
WorkFarm(int process_count)
- process_count is the number of processes in the
farm.
Public methods
void post_job(TimerJobPtr new_job);
- post_job adds a new_job to the
job queue.
void cancel_job(TimerJobPtr old_job);
- cancel_job marks old_job as
being canceled. If the old_job did not start
running it will be removed from the queue. Otherwise the
call as no effect.
Protected Methods
None
Public fields
None
Protected fields
None