1 #ifndef FWCore_Concurrency_SerialTaskQueue_h
2 #define FWCore_Concurrency_SerialTaskQueue_h
59 #include "tbb/task_group.h"
60 #include "tbb/concurrent_queue.h"
118 template <
typename T>
119 void push(tbb::task_group&,
const T& iAction);
139 template <
typename T>
158 void spawn(TaskBase&);
172 template <
typename T>
TaskBase * pushAndGetNextTask(TaskBase *)
const SerialTaskQueue & operator=(const SerialTaskQueue &)=delete
std::atomic< unsigned long > m_pauseCount
void pushTask(TaskBase *)
bool resume()
Resumes processing if the queue was paused.
void push(tbb::task_group &, const T &iAction)
asynchronously pushes functor iAction into queue
tbb::task_group * group()
TaskBase * finishedTask()
bool isPaused() const
Checks to see if the queue has been paused.
SerialTaskQueue(SerialTaskQueue &&iOther)
TaskBase * pickNextTask()
std::atomic< bool > m_taskChosen
QueuedTask(tbb::task_group &iGroup, const T &iAction)
tbb::task_group * m_group
TaskBase(tbb::task_group *iGroup)
virtual ~TaskBase()=default
tbb::concurrent_queue< TaskBase * > m_tasks
bool pause()
Pauses processing of additional tasks from the queue.