libmoost
|
#include <threaded_job_scheduler.hpp>
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 |
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.
Definition at line 212 of file threaded_job_scheduler.hpp.
moost::thread::threaded_job_scheduler::threaded_job_scheduler | ( | size_t | num_workers = 1 | ) | [inline, explicit] |
Create a threaded job scheduler
num_workers | Number of worker threads used to run jobs. |
Definition at line 219 of file threaded_job_scheduler.hpp.
void moost::thread::threaded_job_scheduler::dispatch | ( | boost::shared_ptr< job_batch_type > | batch | ) | [inline] |
Dispatch a batch of jobs
batch | The batch of jobs that need to be run. |
Definition at line 229 of file threaded_job_scheduler.hpp.
Definition at line 235 of file threaded_job_scheduler.hpp.