#include <connect_but_block_self.h>
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_ |
Definition at line 33 of file connect_but_block_self.h.
edm::serviceregistry::BlockingWrapper< Func >::BlockingWrapper | ( | Func | iFunc | ) | [inline] |
Definition at line 38 of file connect_but_block_self.h.
: func_(iFunc), numBlocks_(0) {}
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)...); } }
bool edm::serviceregistry::BlockingWrapper< Func >::startBlocking | ( | ) | [inline, private] |
Definition at line 54 of file connect_but_block_self.h.
References edm::serviceregistry::BlockingWrapper< Func >::numBlocks_.
Referenced by edm::serviceregistry::BlockingWrapper< Func >::operator()().
{ return 1 == ++numBlocks_; }
void edm::serviceregistry::BlockingWrapper< Func >::unblock | ( | ) | [inline, private] |
Definition at line 55 of file connect_but_block_self.h.
References edm::serviceregistry::BlockingWrapper< Func >::numBlocks_.
Referenced by edm::serviceregistry::BlockingWrapper< Func >::operator()().
{ --numBlocks_;}
Func edm::serviceregistry::BlockingWrapper< Func >::func_ [private] |
Definition at line 56 of file connect_but_block_self.h.
Referenced by edm::serviceregistry::BlockingWrapper< Func >::operator()().
int edm::serviceregistry::BlockingWrapper< Func >::numBlocks_ [private] |
Definition at line 57 of file connect_but_block_self.h.
Referenced by edm::serviceregistry::BlockingWrapper< Func >::startBlocking(), and edm::serviceregistry::BlockingWrapper< Func >::unblock().