CMS 3D CMS Logo

Public Member Functions | Private Member Functions | Private Attributes

edm::serviceregistry::BlockingWrapper< Func > Class Template Reference

#include <connect_but_block_self.h>

List of all members.

Public Member Functions

 BlockingWrapper (Func iFunc)
template<typename... Args>
void operator() (Args &&...args)

Private Member Functions

bool startBlocking ()
void unblock ()

Private Attributes

Func func_
int numBlocks_

Detailed Description

template<typename Func>
class edm::serviceregistry::BlockingWrapper< Func >

Definition at line 33 of file connect_but_block_self.h.


Constructor & Destructor Documentation

template<typename Func >
edm::serviceregistry::BlockingWrapper< Func >::BlockingWrapper ( Func  iFunc) [inline]

Definition at line 38 of file connect_but_block_self.h.

: func_(iFunc), numBlocks_(0) {}

Member Function Documentation

template<typename Func >
template<typename... Args>
void edm::serviceregistry::BlockingWrapper< Func >::operator() ( Args &&...  args) [inline]

Definition at line 43 of file connect_but_block_self.h.

References harvestRelVal::args, edm::serviceregistry::BlockingWrapper< Func >::func_, edm::serviceregistry::BlockingWrapper< Func >::startBlocking(), and edm::serviceregistry::BlockingWrapper< Func >::unblock().

                                         {
            std::shared_ptr<void> guard(static_cast<void*>(0), std::bind(&BlockingWrapper::unblock,this) );
           if( startBlocking() ) { func_(std::forward<Args>(args)...); }
         }
template<typename Func >
bool edm::serviceregistry::BlockingWrapper< Func >::startBlocking ( ) [inline, private]
template<typename Func >
void edm::serviceregistry::BlockingWrapper< Func >::unblock ( ) [inline, private]

Member Data Documentation

template<typename Func >
Func edm::serviceregistry::BlockingWrapper< Func >::func_ [private]
template<typename Func >
int edm::serviceregistry::BlockingWrapper< Func >::numBlocks_ [private]