proxygen
|
An IOExecutor that executes funcs under mapped fiber context. More...
#include <FiberIOExecutor.h>
Public Member Functions | |
FiberIOExecutor (const std::shared_ptr< IOExecutor > &ioExecutor, fibers::FiberManager::Options opts=fibers::FiberManager::Options()) | |
virtual void | add (folly::Function< void()> f) override |
virtual folly::EventBase * | getEventBase () override |
![]() | |
~IOExecutor () override=default | |
![]() | |
virtual | ~Executor () |
virtual void | addWithPriority (Func, int8_t priority) |
virtual uint8_t | getNumPriorities () const |
Private Attributes | |
std::shared_ptr< IOExecutor > | ioExecutor_ |
fibers::FiberManager::Options | options_ |
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 |
![]() | |
virtual bool | keepAliveAcquire () |
virtual void | keepAliveRelease () |
![]() | |
template<typename ExecutorT > | |
static bool | isKeepAliveDummy (const KeepAlive< ExecutorT > &keepAlive) |
template<typename ExecutorT > | |
static KeepAlive< ExecutorT > | makeKeepAlive (ExecutorT *executor) |
An IOExecutor that executes funcs under mapped fiber context.
A FiberIOExecutor wraps an IOExecutor, but executes funcs on the FiberManager mapped to the underlying IOExector's event base.
Definition at line 31 of file FiberIOExecutor.h.
|
inlineexplicit |
Definition at line 33 of file FiberIOExecutor.h.
|
inlineoverridevirtual |
Enqueue a function to executed by this executor. This and all variants must be threadsafe.
Implements folly::Executor.
Definition at line 38 of file FiberIOExecutor.h.
References folly::fibers::FiberManager::add(), f, folly::fibers::getFiberManager(), ioExecutor_, folly::gen::move, and options_.
|
inlineoverridevirtual |
Implements folly::IOExecutor.
Definition at line 43 of file FiberIOExecutor.h.
References ioExecutor_.
|
private |
Definition at line 48 of file FiberIOExecutor.h.
Referenced by add(), and getEventBase().
|
private |
Definition at line 49 of file FiberIOExecutor.h.
Referenced by add().