proxygen
|
#include <DefaultKeepAliveExecutor.h>
Classes | |
struct | ControlBlock |
class | WeakRef |
Public Member Functions | |
DefaultKeepAliveExecutor () | |
virtual | ~DefaultKeepAliveExecutor () |
folly::Executor::KeepAlive | weakRef () |
Public Member Functions inherited from folly::Executor | |
virtual | ~Executor () |
virtual void | add (Func)=0 |
virtual void | addWithPriority (Func, int8_t priority) |
virtual uint8_t | getNumPriorities () const |
Protected Member Functions | |
void | joinKeepAlive () |
Private Member Functions | |
bool | keepAliveAcquire () override |
void | keepAliveRelease () override |
Private Attributes | |
std::shared_ptr< ControlBlock > | controlBlock_ {std::make_shared<ControlBlock>()} |
Baton | keepAliveReleaseBaton_ |
KeepAlive< DefaultKeepAliveExecutor > | keepAlive_ |
Additional Inherited Members | |
Static Public Member Functions inherited from folly::Executor | |
template<typename ExecutorT > | |
static KeepAlive< ExecutorT > | getKeepAliveToken (ExecutorT *executor) |
template<typename ExecutorT > | |
static KeepAlive< ExecutorT > | getKeepAliveToken (ExecutorT &executor) |
Static Public Attributes inherited from folly::Executor | |
static const int8_t | LO_PRI = SCHAR_MIN |
static const int8_t | MID_PRI = 0 |
static const int8_t | HI_PRI = SCHAR_MAX |
Static Protected Member Functions inherited from folly::Executor | |
template<typename ExecutorT > | |
static bool | isKeepAliveDummy (const KeepAlive< ExecutorT > &keepAlive) |
template<typename ExecutorT > | |
static KeepAlive< ExecutorT > | makeKeepAlive (ExecutorT *executor) |
An Executor accepts units of work with add(), which should be threadsafe.
Definition at line 30 of file DefaultKeepAliveExecutor.h.
|
inline |
Definition at line 32 of file DefaultKeepAliveExecutor.h.
|
inlinevirtual |
Definition at line 34 of file DefaultKeepAliveExecutor.h.
References keepAlive_.
|
inlineprotected |
Definition at line 43 of file DefaultKeepAliveExecutor.h.
References keepAlive_, keepAliveReleaseBaton_, and folly::Baton< MayBlock, Atom >::wait().
Referenced by folly::ThreadPoolExecutor::joinKeepAliveOnce(), and folly::VirtualExecutor::~VirtualExecutor().
|
inlineoverrideprivatevirtual |
Reimplemented from folly::Executor.
Definition at line 126 of file DefaultKeepAliveExecutor.h.
References controlBlock_.
|
inlineoverrideprivatevirtual |
Reimplemented from folly::Executor.
Definition at line 134 of file DefaultKeepAliveExecutor.h.
References controlBlock_, keepAliveReleaseBaton_, and folly::Baton< MayBlock, Atom >::post().
|
inline |
Definition at line 38 of file DefaultKeepAliveExecutor.h.
References controlBlock_, and folly::DefaultKeepAliveExecutor::WeakRef::create().
|
private |
Definition at line 144 of file DefaultKeepAliveExecutor.h.
Referenced by keepAliveAcquire(), keepAliveRelease(), folly::DefaultKeepAliveExecutor::WeakRef::lock(), and weakRef().
|
private |
Definition at line 146 of file DefaultKeepAliveExecutor.h.
Referenced by joinKeepAlive(), folly::VirtualExecutor::wrapFunc(), and ~DefaultKeepAliveExecutor().
|
private |
Definition at line 145 of file DefaultKeepAliveExecutor.h.
Referenced by joinKeepAlive(), and keepAliveRelease().