CMS 3D CMS Logo

List of all members | Public Member Functions | Protected Member Functions | Private Attributes
edm::Async Class Referenceabstract

#include <Async.h>

Inheritance diagram for edm::Async:
edm::service::AsyncService

Public Member Functions

 Async ()=default
 
 Async (Async const &)=delete
 
 Async (Async &&)=delete
 
Asyncoperator= (Async const &)=delete
 
Asyncoperator= (Async &&)=delete
 
template<typename F , typename G >
void runAsync (WaitingTaskWithArenaHolder holder, F &&func, G &&errorContextFunc)
 
virtual ~Async () noexcept
 

Protected Member Functions

virtual void ensureAllowed () const =0
 

Private Attributes

WaitingThreadPool pool_
 

Detailed Description

Definition at line 9 of file Async.h.

Constructor & Destructor Documentation

◆ Async() [1/3]

edm::Async::Async ( )
default

◆ ~Async()

edm::Async::~Async ( )
virtualdefaultnoexcept

◆ Async() [2/3]

edm::Async::Async ( Async const &  )
delete

◆ Async() [3/3]

edm::Async::Async ( Async &&  )
delete

Member Function Documentation

◆ ensureAllowed()

virtual void edm::Async::ensureAllowed ( ) const
protectedpure virtual

Implemented in edm::service::AsyncService.

Referenced by runAsync().

◆ operator=() [1/2]

Async& edm::Async::operator= ( Async const &  )
delete

◆ operator=() [2/2]

Async& edm::Async::operator= ( Async &&  )
delete

◆ runAsync()

template<typename F , typename G >
void edm::Async::runAsync ( WaitingTaskWithArenaHolder  holder,
F &&  func,
G &&  errorContextFunc 
)
inline

Definition at line 21 of file Async.h.

References ensureAllowed(), EcalMonitorTask_cff::func, eostools::move(), pool_, and edm::WaitingThreadPool::runAsync().

Referenced by ALPAKA_ACCELERATOR_NAMESPACE::EDMetadata::enqueueCallback(), and cms::cuda::impl::ScopedContextHolderHelper::enqueueCallback().

21  {
22  ensureAllowed();
23  pool_.runAsync(std::move(holder), std::forward<F>(func), std::forward<G>(errorContextFunc));
24  }
void runAsync(WaitingTaskWithArenaHolder holder, F &&func, G &&errorContextFunc)
WaitingThreadPool pool_
Definition: Async.h:30
virtual void ensureAllowed() const =0
def move(src, dest)
Definition: eostools.py:511

Member Data Documentation

◆ pool_

WaitingThreadPool edm::Async::pool_
private

Definition at line 30 of file Async.h.

Referenced by runAsync().