proxygen
|
#include <VirtualExecutor.h>
Public Member Functions | |
VirtualExecutor (KeepAlive<> executor) | |
VirtualExecutor (Executor *executor) | |
VirtualExecutor (Executor &executor) | |
VirtualExecutor (const VirtualExecutor &)=delete | |
VirtualExecutor & | operator= (const VirtualExecutor &)=delete |
uint8_t | getNumPriorities () const override |
void | add (Func f) override |
void | addWithPriority (Func f, int8_t priority) override |
~VirtualExecutor () override | |
![]() | |
DefaultKeepAliveExecutor () | |
virtual | ~DefaultKeepAliveExecutor () |
folly::Executor::KeepAlive | weakRef () |
![]() | |
virtual | ~Executor () |
Private Member Functions | |
auto | wrapFunc (Func f) |
Private Attributes | |
const KeepAlive | executor_ |
Additional Inherited Members | |
![]() | |
template<typename ExecutorT > | |
static KeepAlive< ExecutorT > | getKeepAliveToken (ExecutorT *executor) |
template<typename ExecutorT > | |
static KeepAlive< ExecutorT > | getKeepAliveToken (ExecutorT &executor) |
![]() | |
static const int8_t | LO_PRI = SCHAR_MIN |
static const int8_t | MID_PRI = 0 |
static const int8_t | HI_PRI = SCHAR_MAX |
![]() | |
void | joinKeepAlive () |
![]() | |
template<typename ExecutorT > | |
static bool | isKeepAliveDummy (const KeepAlive< ExecutorT > &keepAlive) |
template<typename ExecutorT > | |
static KeepAlive< ExecutorT > | makeKeepAlive (ExecutorT *executor) |
VirtualExecutor implements a light-weight view onto existing Executor.
Multiple VirtualExecutors can be backed by a single Executor.
VirtualExecutor's destructor blocks until all tasks scheduled through it are complete. Executor's destructor also blocks until all VirtualExecutors backed by it are released.
Definition at line 32 of file VirtualExecutor.h.
|
inlineexplicit |
Definition at line 52 of file VirtualExecutor.h.
References executor_, and folly::Executor::isKeepAliveDummy().
Referenced by VirtualExecutor().
|
inlineexplicit |
Definition at line 57 of file VirtualExecutor.h.
|
inlineexplicit |
Definition at line 60 of file VirtualExecutor.h.
References operator=(), and VirtualExecutor().
|
delete |
|
inlineoverride |
Definition at line 78 of file VirtualExecutor.h.
References folly::DefaultKeepAliveExecutor::joinKeepAlive().
|
inlineoverridevirtual |
Enqueue a function to executed by this executor. This and all variants must be threadsafe.
Implements folly::Executor.
Definition at line 70 of file VirtualExecutor.h.
References executor_, folly::gen::move, and wrapFunc().
Referenced by virtualExecutorTest().
Enqueue a function with a given priority, where 0 is the medium priority This is up to the implementation to enforce
Reimplemented from folly::Executor.
Definition at line 74 of file VirtualExecutor.h.
References executor_, folly::gen::move, and wrapFunc().
Referenced by TEST().
|
inlineoverridevirtual |
Reimplemented from folly::Executor.
Definition at line 66 of file VirtualExecutor.h.
References executor_.
|
delete |
Referenced by VirtualExecutor().
|
inlineprivate |
Definition at line 33 of file VirtualExecutor.h.
References folly::pushmi::executor, folly::Executor::getKeepAliveToken(), folly::DefaultKeepAliveExecutor::keepAlive_, and folly::gen::move.
Referenced by add(), and addWithPriority().
|
private |
Definition at line 83 of file VirtualExecutor.h.
Referenced by add(), addWithPriority(), getNumPriorities(), and VirtualExecutor().