#include <WaitingTaskWithArenaHolder.h>
Public Member Functions | |
void | doneWaiting (std::exception_ptr iExcept) |
oneapi::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 (oneapi::tbb::task_group &, WaitingTask *iTask) | |
WaitingTaskWithArenaHolder (WaitingTaskHolder &&iTask) | |
WaitingTaskWithArenaHolder (WaitingTaskWithArenaHolder const &iHolder) | |
WaitingTaskWithArenaHolder (WaitingTaskWithArenaHolder &&iOther) | |
~WaitingTaskWithArenaHolder () | |
Private Attributes | |
std::shared_ptr< oneapi::tbb::task_arena > | m_arena |
oneapi::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 28 of file WaitingTaskWithArenaHolder.cc.
edm::WaitingTaskWithArenaHolder::~WaitingTaskWithArenaHolder | ( | ) |
Definition at line 33 of file WaitingTaskWithArenaHolder.cc.
References doneWaiting(), and m_task.
edm::WaitingTaskWithArenaHolder::WaitingTaskWithArenaHolder | ( | WaitingTaskWithArenaHolder const & | iHolder | ) |
Definition at line 39 of file WaitingTaskWithArenaHolder.cc.
References edm::TaskBase::increment_ref_count(), LIKELY, and m_task.
edm::WaitingTaskWithArenaHolder::WaitingTaskWithArenaHolder | ( | WaitingTaskWithArenaHolder && | iOther | ) |
Definition at line 46 of file WaitingTaskWithArenaHolder.cc.
void edm::WaitingTaskWithArenaHolder::doneWaiting | ( | std::exception_ptr | iExcept | ) |
Definition at line 71 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 oneapi::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 |
Definition at line 114 of file WaitingTaskWithArenaHolder.cc.
References m_task.
WaitingTaskHolder edm::WaitingTaskWithArenaHolder::makeWaitingTaskHolderAndRelease | ( | ) |
Definition at line 105 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 51 of file WaitingTaskWithArenaHolder.cc.
References m_arena, m_group, m_task, edm::swap(), and createJobs::tmp.
WaitingTaskWithArenaHolder & edm::WaitingTaskWithArenaHolder::operator= | ( | WaitingTaskWithArenaHolder && | iRHS | ) |
Definition at line 59 of file WaitingTaskWithArenaHolder.cc.
References m_arena, m_group, m_task, eostools::move(), edm::swap(), and createJobs::tmp.
|
noexcept |
Definition at line 112 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().