libmoost
|
#include <simple_job_scheduler.hpp>
Public Member Functions | |
simple_job_batch () | |
virtual void | add (job_t job) |
void | run () |
size_t | count () const |
const std::vector< std::string > & | errors () const |
Private Attributes | |
size_t | m_count |
std::vector< std::string > | m_errors |
Definition at line 44 of file simple_job_scheduler.hpp.
moost::thread::simple_job_batch::simple_job_batch | ( | ) | [inline] |
Definition at line 48 of file simple_job_scheduler.hpp.
virtual void moost::thread::simple_job_batch::add | ( | job_t | job | ) | [inline, virtual] |
Add a new job to the batch
This method adds a job to the concrete implementation. When this job gets run is determined by the implementation. However, new jobs may be added even while jobs from the current batch are being run as long as the batch doesn't run out of jobs. In particular, this means that it's always safe to add new jobs from within jobs of the current batch.
job | The job to be added. |
Implements moost::thread::job_batch.
Definition at line 53 of file simple_job_scheduler.hpp.
size_t moost::thread::simple_job_batch::count | ( | ) | const [inline] |
Definition at line 75 of file simple_job_scheduler.hpp.
const std::vector<std::string>& moost::thread::simple_job_batch::errors | ( | ) | const [inline] |
Definition at line 80 of file simple_job_scheduler.hpp.
void moost::thread::simple_job_batch::run | ( | ) | [inline] |
Definition at line 71 of file simple_job_scheduler.hpp.
size_t moost::thread::simple_job_batch::m_count [private] |
Definition at line 86 of file simple_job_scheduler.hpp.
std::vector<std::string> moost::thread::simple_job_batch::m_errors [private] |
Definition at line 87 of file simple_job_scheduler.hpp.