1 #ifndef FWCore_Concurrency_WaitingTaskList_h
2 #define FWCore_Concurrency_WaitingTaskList_h
std::atomic< bool > m_waiting
std::atomic< unsigned int > m_lastAssignedCacheIndex
std::atomic< WaitNode * > m_head
tbb::task_group * m_group
void reset()
Resets access to the resource so that added tasks will wait.
std::atomic< WaitNode * > m_next
void doneWaiting(std::exception_ptr iPtr)
Signals that the resource is now available and tasks should be spawned.
std::unique_ptr< WaitNode[]> m_nodeCache
std::exception_ptr m_exceptionPtr
#define CMS_THREAD_GUARD(_var_)
WaitingTaskList(unsigned int iInitialSize=2)
Constructor.
void add(tbb::task_group *, WaitingTask *)
Adds task to the waiting list.
unsigned int m_nodeCacheSize
void presetTaskAsFailed(std::exception_ptr iExcept)
WaitNode * nextNode() const
void setNextNode(WaitNode *iNext)
~WaitingTaskList()=default
const WaitingTaskList & operator=(const WaitingTaskList &)=delete
WaitNode * createNode(tbb::task_group *iGroup, WaitingTask *iTask)