CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes | Friends
edm::TaskBase Class Referenceabstract

#include <TaskBase.h>

Inheritance diagram for edm::TaskBase:
edm::FunctorTask< F > edm::WaitingTask edm::FinalWaitingTask edm::FunctorWaitingTask< F > edm::Worker::AcquireTask< T, DUMMY > edm::Worker::AcquireTask< OccurrenceTraits< EventPrincipal, BranchActionStreamBegin >, DUMMY > edm::Worker::HandleExternalWorkExceptionTask edm::Worker::RunModuleTask< T >

Public Member Functions

unsigned int decrement_ref_count () noexcept
 
virtual void execute ()=0
 
void increment_ref_count () noexcept
 
 TaskBase () noexcept
 Constructor. More...
 
virtual ~TaskBase () noexcept=default
 

Private Member Functions

virtual void recycle ()
 

Private Attributes

std::atomic< unsigned int > m_refCount {0}
 

Friends

class TaskSentry
 

Detailed Description

Definition at line 31 of file TaskBase.h.

Constructor & Destructor Documentation

◆ TaskBase()

edm::TaskBase::TaskBase ( )
inlinenoexcept

Constructor.

Definition at line 36 of file TaskBase.h.

36 : m_refCount{0} {}
std::atomic< unsigned int > m_refCount
Definition: TaskBase.h:47

◆ ~TaskBase()

virtual edm::TaskBase::~TaskBase ( )
virtualdefaultnoexcept

Member Function Documentation

◆ decrement_ref_count()

unsigned int edm::TaskBase::decrement_ref_count ( )
inlinenoexcept

Definition at line 42 of file TaskBase.h.

References m_refCount.

Referenced by edm::WaitingTaskList::add(), and edm::WaitingTaskWithArenaHolder::makeWaitingTaskHolderAndRelease().

42 { return --m_refCount; }
std::atomic< unsigned int > m_refCount
Definition: TaskBase.h:47

◆ execute()

virtual void edm::TaskBase::execute ( )
pure virtual

◆ increment_ref_count()

void edm::TaskBase::increment_ref_count ( )
inlinenoexcept

◆ recycle()

virtual void edm::TaskBase::recycle ( )
inlineprivatevirtual

Reimplemented in edm::FinalWaitingTask.

Definition at line 45 of file TaskBase.h.

Referenced by edm::TaskSentry::~TaskSentry().

45 { delete this; }

Friends And Related Function Documentation

◆ TaskSentry

friend class TaskSentry
friend

Definition at line 33 of file TaskBase.h.

Member Data Documentation

◆ m_refCount

std::atomic<unsigned int> edm::TaskBase::m_refCount {0}
private

Definition at line 47 of file TaskBase.h.

Referenced by decrement_ref_count(), and increment_ref_count().