#include <WaitingTask.h>
Public Member Functions | |
std::exception_ptr | exceptionPtr () const noexcept |
Returns exception thrown by dependent task. More... | |
WaitingTask () noexcept | |
Constructor. More... | |
~WaitingTask () noexcept override | |
Public Member Functions inherited from edm::TaskBase | |
unsigned int | decrement_ref_count () noexcept |
virtual void | execute ()=0 |
void | increment_ref_count () noexcept |
TaskBase () noexcept | |
Constructor. More... | |
virtual | ~TaskBase () noexcept=default |
Protected Member Functions | |
std::exception_ptr const & | uncheckedExceptionPtr () const noexcept |
Private Types | |
enum | State : unsigned char { State::kUnset = 0, State::kSetting = 1, State::kSet = 2 } |
Private Member Functions | |
void | dependentTaskFailed (std::exception_ptr iPtr) noexcept |
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 |
|
inlinenoexcept |
|
inlineoverridenoexcept |
Definition at line 44 of file WaitingTask.h.
|
inlineprivatenoexcept |
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().
|
inlinenoexcept |
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::AcquireTask< OccurrenceTraits< EventPrincipal, BranchActionStreamBegin >, DUMMY >::execute(), edm::Worker::HandleExternalWorkExceptionTask::execute(), edm::WaitingTaskHolder::taskHasFailed(), edm::WaitingTaskWithArenaHolder::taskHasFailed(), edm::FinalWaitingTask::wait(), and edm::FinalWaitingTask::waitNoThrow().
|
inlineprotectednoexcept |
|
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().