#include <WaitingTaskWithArenaHolder.h>
Public Member Functions | |
void | doneWaiting (std::exception_ptr iExcept) |
tbb::task_group * | group () const |
bool | hasTask () const noexcept |
WaitingTaskHolder | makeWaitingTaskHolderAndRelease () |
WaitingTaskWithArenaHolder & | operator= (const WaitingTaskWithArenaHolder &iRHS) |
WaitingTaskWithArenaHolder & | operator= (WaitingTaskWithArenaHolder &&iRHS) |
bool | taskHasFailed () const noexcept |
WaitingTaskWithArenaHolder () | |
WaitingTaskWithArenaHolder (tbb::task_group &, WaitingTask *iTask) | |
WaitingTaskWithArenaHolder (WaitingTaskHolder &&iTask) | |
WaitingTaskWithArenaHolder (WaitingTaskWithArenaHolder &&iOther) | |
WaitingTaskWithArenaHolder (WaitingTaskWithArenaHolder const &iHolder) | |
~WaitingTaskWithArenaHolder () | |
Private Attributes | |
std::shared_ptr< tbb::task_arena > | m_arena |
tbb::task_group * | m_group |
WaitingTask * | m_task |
Description: This holds a WaitingTask and can be passed to something the WaitingTask is waiting for. That allows that something to call doneWaiting to let the WaitingTask know it can run. The use of the arena allows one to call doneWaiting from a thread external to the arena where the task should run. The external thread might be a non-TBB thread.
Definition at line 34 of file WaitingTaskWithArenaHolder.h.
edm::WaitingTaskWithArenaHolder::WaitingTaskWithArenaHolder | ( | ) |
Definition at line 16 of file WaitingTaskWithArenaHolder.cc.
|
explicit |
Definition at line 21 of file WaitingTaskWithArenaHolder.cc.
References edm::TaskBase::increment_ref_count(), and m_task.
|
explicit |
Definition at line 26 of file WaitingTaskWithArenaHolder.cc.
edm::WaitingTaskWithArenaHolder::~WaitingTaskWithArenaHolder | ( | ) |
Definition at line 31 of file WaitingTaskWithArenaHolder.cc.
References doneWaiting(), and m_task.
edm::WaitingTaskWithArenaHolder::WaitingTaskWithArenaHolder | ( | WaitingTaskWithArenaHolder const & | iHolder | ) |
Definition at line 37 of file WaitingTaskWithArenaHolder.cc.
References edm::TaskBase::increment_ref_count(), LIKELY, and m_task.
edm::WaitingTaskWithArenaHolder::WaitingTaskWithArenaHolder | ( | WaitingTaskWithArenaHolder && | iOther | ) |
void edm::WaitingTaskWithArenaHolder::doneWaiting | ( | std::exception_ptr | iExcept | ) |
Definition at line 69 of file WaitingTaskWithArenaHolder.cc.
References edm::WaitingTask::dependentTaskFailed(), group(), m_arena, m_group, m_task, alignCSCRings::s, and TrackValidation_cff::task.
Referenced by edm::Worker::runAcquireAfterAsyncPrefetch(), and ~WaitingTaskWithArenaHolder().
|
inline |
since tbb::task_group is thread safe, we can return it non-const from here since the object is not really part of the state of the holder
Definition at line 83 of file WaitingTaskWithArenaHolder.h.
References m_group.
Referenced by doneWaiting(), and cms::cuda::impl::ScopedContextHolderHelper::pushNextTask().
|
noexcept |
WaitingTaskHolder edm::WaitingTaskWithArenaHolder::makeWaitingTaskHolderAndRelease | ( | ) |
Definition at line 103 of file WaitingTaskWithArenaHolder.cc.
References edm::TaskBase::decrement_ref_count(), m_group, and m_task.
Referenced by evf::GlobalEvFOutputModule::acquire().
WaitingTaskWithArenaHolder & edm::WaitingTaskWithArenaHolder::operator= | ( | const WaitingTaskWithArenaHolder & | iRHS | ) |
Definition at line 49 of file WaitingTaskWithArenaHolder.cc.
References m_arena, m_group, m_task, std::swap(), and createJobs::tmp.
WaitingTaskWithArenaHolder & edm::WaitingTaskWithArenaHolder::operator= | ( | WaitingTaskWithArenaHolder && | iRHS | ) |
Definition at line 57 of file WaitingTaskWithArenaHolder.cc.
References m_arena, m_group, m_task, eostools::move(), std::swap(), and createJobs::tmp.
|
noexcept |
Definition at line 110 of file WaitingTaskWithArenaHolder.cc.
References edm::WaitingTask::exceptionPtr(), and m_task.
|
private |
Definition at line 89 of file WaitingTaskWithArenaHolder.h.
Referenced by doneWaiting(), and operator=().
|
private |
Definition at line 88 of file WaitingTaskWithArenaHolder.h.
Referenced by doneWaiting(), group(), makeWaitingTaskHolderAndRelease(), and operator=().
|
private |
Definition at line 87 of file WaitingTaskWithArenaHolder.h.
Referenced by doneWaiting(), hasTask(), makeWaitingTaskHolderAndRelease(), operator=(), taskHasFailed(), WaitingTaskWithArenaHolder(), and ~WaitingTaskWithArenaHolder().