83 std::shared_ptr<WorkQueue_Impl> impl;
WorkQueue(bool serial_queue=false)
Constructs a work queue.
int get_items_queued() const
Returns the number of items currently queued.
Interface for executing work on a worker thread.
Definition: work_queue.h:40
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.
void queue(WorkItem *item)
Queue some work to be executed on a worker thread.
virtual ~WorkItem()
Definition: work_queue.h:43
Thread pool for worker threads.
Definition: work_queue.h:55
virtual void process_work()=0
Called by a worker thread to process work.
virtual void work_completed()
Called by the WorkQueue thread to complete the work.
Definition: work_queue.h:49