#include <WaitingTask.h>
Public Member Functions | |
std::exception_ptr | exceptionPtr () const |
Returns exception thrown by dependent task. More... | |
WaitingTask () | |
Constructor. More... | |
~WaitingTask () override | |
Public Member Functions inherited from edm::TaskBase | |
unsigned int | decrement_ref_count () |
virtual void | execute ()=0 |
void | increment_ref_count () |
TaskBase () | |
Constructor. More... | |
virtual | ~TaskBase ()=default |
Protected Member Functions | |
std::exception_ptr const & | uncheckedExceptionPtr () const |
Private Types | |
enum | State : unsigned char { State::kUnset = 0, State::kSetting = 1, State::kSet = 2 } |
Private Member Functions | |
void | dependentTaskFailed (std::exception_ptr iPtr) |
Called if waited for task failed. More... | |
Private Attributes | |
std::exception_ptr | m_ptr |
std::atomic< unsigned char > | m_ptrSet = static_cast<unsigned char>(State::kUnset) |
Friends | |
class | WaitingTaskHolder |
class | WaitingTaskList |
class | WaitingTaskWithArenaHolder |
Definition at line 36 of file WaitingTask.h.
|
strongprivate |
|
inline |
|
inlineoverride |
Definition at line 44 of file WaitingTask.h.
|
inlineprivate |
Called if waited for task failed.
Allows transfer of the exception caused by the dependent task to be moved to another thread. This method should only be called by WaitingTaskList
Definition at line 68 of file WaitingTask.h.
References kSet, kSetting, kUnset, m_ptr, and m_ptrSet.
Referenced by edm::WaitingTaskList::add(), edm::WaitingTaskWithArenaHolder::doneWaiting(), edm::WaitingTaskHolder::doneWaiting(), edm::WaitingTaskHolder::presetTaskAsFailed(), and edm::WaitingTaskList::presetTaskAsFailed().
|
inline |
Returns exception thrown by dependent task.
If the value evalutes to true then the dependent task failed.
Definition at line 51 of file WaitingTask.h.
References kSet, m_ptr, and m_ptrSet.
Referenced by edm::Worker::RunModuleTask< T >::execute(), edm::Worker::AcquireTask< OccurrenceTraits< EventPrincipal, BranchActionStreamBegin >, DUMMY >::execute(), edm::WaitingTaskHolder::taskHasFailed(), edm::WaitingTaskWithArenaHolder::taskHasFailed(), edm::FinalWaitingTask::wait(), and edm::FinalWaitingTask::waitNoThrow().
|
inlineprotected |
|
friend |
Definition at line 39 of file WaitingTask.h.
|
friend |
Definition at line 38 of file WaitingTask.h.
|
friend |
Definition at line 40 of file WaitingTask.h.
|
private |
Definition at line 76 of file WaitingTask.h.
Referenced by dependentTaskFailed(), exceptionPtr(), and uncheckedExceptionPtr().
|
private |
Definition at line 77 of file WaitingTask.h.
Referenced by dependentTaskFailed(), and exceptionPtr().