CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes
edm::SerialTaskQueue::QueuedTask< T > Class Template Reference
Inheritance diagram for edm::SerialTaskQueue::QueuedTask< T >:
edm::SerialTaskQueue::TaskBase

Public Member Functions

 QueuedTask (tbb::task_group &iGroup, const T &iAction)
 
- Public Member Functions inherited from edm::SerialTaskQueue::TaskBase
virtual ~TaskBase ()=default
 

Private Member Functions

void execute () final
 

Private Attributes

T m_action
 

Additional Inherited Members

- Protected Member Functions inherited from edm::SerialTaskQueue::TaskBase
 TaskBase (tbb::task_group *iGroup)
 

Detailed Description

template<typename T>
class edm::SerialTaskQueue::QueuedTask< T >

Definition at line 140 of file SerialTaskQueue.h.

Constructor & Destructor Documentation

◆ QueuedTask()

template<typename T >
edm::SerialTaskQueue::QueuedTask< T >::QueuedTask ( tbb::task_group &  iGroup,
const T iAction 
)
inline

Definition at line 142 of file SerialTaskQueue.h.

142 : TaskBase(&iGroup), m_action(iAction) {}

Member Function Documentation

◆ execute()

template<typename T >
void edm::SerialTaskQueue::QueuedTask< T >::execute ( void  )
finalprivatevirtual

Implements edm::SerialTaskQueue::TaskBase.

Definition at line 173 of file SerialTaskQueue.h.

173  {
174  // Exception has to swallowed in order to avoid throwing from execute(). The user of SerialTaskQueue should handle exceptions within m_action().
175  CMS_SA_ALLOW try { this->m_action(); } catch (...) {
176  }
177  }

References CMS_SA_ALLOW, and edm::SerialTaskQueue::QueuedTask< T >::m_action.

Member Data Documentation

◆ m_action

template<typename T >
T edm::SerialTaskQueue::QueuedTask< T >::m_action
private

Definition at line 147 of file SerialTaskQueue.h.

Referenced by edm::SerialTaskQueue::QueuedTask< T >::execute().

CMS_SA_ALLOW
#define CMS_SA_ALLOW
Definition: thread_safety_macros.h:5
edm::SerialTaskQueue::TaskBase::TaskBase
TaskBase(tbb::task_group *iGroup)
Definition: SerialTaskQueue.h:133
edm::SerialTaskQueue::QueuedTask::m_action
T m_action
Definition: SerialTaskQueue.h:147