CARMA C++
carma::control::WorkerPool Class Reference

A pool of workers that can have work requests queued to it for servicing. More...

#include <carma/control/WorkerPool.h>

Public Member Functions

void getStatistics (struct WorkerPoolStats &stats)
 Get statistics about this WorkerPool object. More...
 
void queueRequestGroup (const ::std::set< util::WorkRequest > &group)
 Queue a group of work requests for servicing. More...
 
void queueRequestGroup (const ::std::set< util::WorkRequest > &group, bool logStats)
 Queue a group of work requests for servicing. More...
 
void queueRequestGroup (const ::std::set< util::WorkRequest > &group, struct::timeval &queueTime)
 Queue a group of work requests for servicing. More...
 
void queueRequestGroup (const ::std::set< util::WorkRequest > &group, bool logStats, struct::timeval &queueTime)
 Queue a group of work requests for servicing. More...
 
void queueRequestGroup (const ::std::set< util::WorkRequest > &group, struct::timespec &queueTime)
 Queue a group of work requests for servicing. More...
 
void queueRequestGroup (const ::std::set< util::WorkRequest > &group, bool logStats, struct::timespec &queueTime)
 Queue a group of work requests for servicing. More...
 
 WorkerPool (const ::std::string &id,::size_t numWorkers, bool logStatsByDefault)
 Construct a pool of workers. More...
 
virtual ~WorkerPool ()
 Destruct a pool of workers. More...
 

Detailed Description

A pool of workers that can have work requests queued to it for servicing.

Note
At present there is no guarantee about the order in which queued work requests will be serviced.

Definition at line 63 of file WorkerPool.h.

Constructor & Destructor Documentation

carma::control::WorkerPool::WorkerPool ( const ::std::string &  id,
::size_t  numWorkers,
bool  logStatsByDefault 
)

Construct a pool of workers.

virtual carma::control::WorkerPool::~WorkerPool ( )
virtual

Destruct a pool of workers.

Member Function Documentation

void carma::control::WorkerPool::getStatistics ( struct WorkerPoolStats stats)

Get statistics about this WorkerPool object.

This MUST be called exactly once every 500ms frame, no more, no less. The "frame" values are cleared each time this is called.

void carma::control::WorkerPool::queueRequestGroup ( const ::std::set< util::WorkRequest > &  group)

Queue a group of work requests for servicing.

This operation is atomic with respect to exceptions. Either all the work requests in the group are queued for servicing or none of them are queued.

void carma::control::WorkerPool::queueRequestGroup ( const ::std::set< util::WorkRequest > &  group,
bool  logStats 
)

Queue a group of work requests for servicing.

This operation is atomic with respect to exceptions. Either all the work requests in the group are queued for servicing or none of them are queued.

void carma::control::WorkerPool::queueRequestGroup ( const ::std::set< util::WorkRequest > &  group,
struct::timeval &  queueTime 
)

Queue a group of work requests for servicing.

This operation is atomic with respect to exceptions. Either all the work requests in the group are queued for servicing or none of them are queued.

void carma::control::WorkerPool::queueRequestGroup ( const ::std::set< util::WorkRequest > &  group,
bool  logStats,
struct::timeval &  queueTime 
)

Queue a group of work requests for servicing.

This operation is atomic with respect to exceptions. Either all the work requests in the group are queued for servicing or none of them are queued.

void carma::control::WorkerPool::queueRequestGroup ( const ::std::set< util::WorkRequest > &  group,
struct::timespec &  queueTime 
)

Queue a group of work requests for servicing.

This operation is atomic with respect to exceptions. Either all the work requests in the group are queued for servicing or none of them are queued.

void carma::control::WorkerPool::queueRequestGroup ( const ::std::set< util::WorkRequest > &  group,
bool  logStats,
struct::timespec &  queueTime 
)

Queue a group of work requests for servicing.

This operation is atomic with respect to exceptions. Either all the work requests in the group are queued for servicing or none of them are queued.


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