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