70 void queue(
const std::function<
void()> &func);
85 std::shared_ptr<WorkQueue_Impl> impl;
virtual void process_work()=0
Called by a worker thread to process work.
void queue(const std::function< void()> &func)
Queue some work to be executed on a worker thread.
Interface for executing work on a worker thread.
Definition: work_queue.h:42
void queue(WorkItem *item)
Queue some work to be executed on a worker thread.
int get_items_queued() const
Returns the number of items currently queued.
Thread pool for worker threads.
Definition: work_queue.h:57
WorkQueue(bool serial_queue=false)
Constructs a work queue.
virtual void work_completed()
Called by the WorkQueue thread to complete the work.
Definition: work_queue.h:50
void process_work_completed()
Process work completed queue.
void work_completed(const std::function< void()> &func)
Queue some work to be executed on the main WorkQueue thread.
virtual ~WorkItem()
Definition: work_queue.h:44