Go to the documentation of this file. 1 #ifndef FWCore_Concurrency_WaitingTaskList_h
2 #define FWCore_Concurrency_WaitingTaskList_h
90 namespace waitingtask {
97 return std::unique_ptr<edm::EmptyWaitingTask, waitingtask::TaskDestroyer>(
new (tbb::task::allocate_root())
void operator()(tbb::task *iTask) const
std::atomic< WaitNode * > m_head
tbb::task * execute() override
void add(WaitingTask *)
Adds task to the waiting list.
WaitNode * createNode(WaitingTask *iTask)
std::unique_ptr< WaitNode[]> m_nodeCache
std::atomic< bool > m_waiting
std::atomic< unsigned int > m_lastAssignedCacheIndex
std::atomic< WaitNode * > m_next
void reset()
Resets access to the resource so that added tasks will wait.
void presetTaskAsFailed(std::exception_ptr iExcept)
void doneWaiting(std::exception_ptr iPtr)
Signals that the resource is now available and tasks should be spawned.
WaitNode * nextNode() const
~WaitingTaskList()=default
EmptyWaitingTask()=default
unsigned int m_nodeCacheSize
std::unique_ptr< edm::EmptyWaitingTask, waitingtask::TaskDestroyer > make_empty_waiting_task()
Create an EmptyWaitingTask which will properly be destroyed.
WaitingTaskList(unsigned int iInitialSize=2)
Constructor.
std::exception_ptr m_exceptionPtr
void setNextNode(WaitNode *iNext)
const WaitingTaskList & operator=(const WaitingTaskList &)=delete
#define CMS_THREAD_GUARD(_var_)