libmoost
moost::thread::threaded_job_scheduler Class Reference

#include <threaded_job_scheduler.hpp>

Inheritance diagram for moost::thread::threaded_job_scheduler:
Collaboration diagram for moost::thread::threaded_job_scheduler:

List of all members.

Public Types

typedef threaded_job_batch job_batch_type

Public Member Functions

 threaded_job_scheduler (size_t num_workers=1)
void dispatch (boost::shared_ptr< job_batch_type > batch)

Private Attributes

worker_group m_workers

Detailed Description

A scheduler to run job batches in multiple worker threads

The scheduler mainly provides a set of worker threads, the actual distribution of jobs is done by threaded_job_batch.

Definition at line 209 of file threaded_job_scheduler.hpp.


Member Typedef Documentation


Constructor & Destructor Documentation

moost::thread::threaded_job_scheduler::threaded_job_scheduler ( size_t  num_workers = 1) [inline, explicit]

Create a threaded job scheduler

Parameters:
num_workersNumber of worker threads used to run jobs.

Definition at line 219 of file threaded_job_scheduler.hpp.


Member Function Documentation

void moost::thread::threaded_job_scheduler::dispatch ( boost::shared_ptr< job_batch_type batch) [inline]

Dispatch a batch of jobs

Parameters:
batchThe batch of jobs that need to be run.

Definition at line 229 of file threaded_job_scheduler.hpp.


Member Data Documentation


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