proxygen
|
#include <EventBaseLoopController.h>
Classes | |
class | ControllerCallback |
Public Member Functions | |
EventBaseLoopController () | |
~EventBaseLoopController () override | |
void | attachEventBase (EventBase &eventBase) |
void | attachEventBase (VirtualEventBase &eventBase) |
VirtualEventBase * | getEventBase () |
void | setLoopRunner (InlineFunctionRunner *loopRunner) |
Public Member Functions inherited from folly::fibers::LoopController | |
virtual | ~LoopController () |
Private Member Functions | |
void | setFiberManager (FiberManager *fm) override |
void | schedule () override |
void | runLoop () override |
void | scheduleThreadSafe () override |
void | timedSchedule (std::function< void()> func, TimePoint time) override |
Private Attributes | |
bool | awaitingScheduling_ {false} |
VirtualEventBase * | eventBase_ {nullptr} |
Executor::KeepAlive< VirtualEventBase > | eventBaseKeepAlive_ |
ControllerCallback | callback_ |
FiberManager * | fm_ {nullptr} |
std::atomic< bool > | eventBaseAttached_ {false} |
InlineFunctionRunner * | loopRunner_ {nullptr} |
Friends | |
class | FiberManager |
Additional Inherited Members | |
Public Types inherited from folly::fibers::LoopController | |
typedef std::chrono::steady_clock | Clock |
typedef std::chrono::time_point< Clock > | TimePoint |
Definition at line 27 of file EventBaseLoopController.h.
|
inlineexplicit |
Definition at line 22 of file EventBaseLoopController-inl.h.
|
inlineoverride |
Definition at line 24 of file EventBaseLoopController-inl.h.
References callback_, folly::EventBase::LoopCallback::cancelLoopCallback(), and eventBaseKeepAlive_.
|
inline |
Attach EventBase after LoopController was created.
Definition at line 29 of file EventBaseLoopController-inl.h.
References folly::EventBase::getVirtualEventBase().
|
inline |
Definition at line 33 of file EventBaseLoopController-inl.h.
References awaitingScheduling_, eventBase_, eventBaseAttached_, and schedule().
|
inline |
Definition at line 38 of file EventBaseLoopController.h.
References eventBase_.
Referenced by TEST_F().
|
inlineoverrideprivatevirtual |
Run FiberManager loopUntilNoReadyImpl(). May have additional logic specific to a LoopController.
Implements folly::fibers::LoopController.
Definition at line 66 of file EventBaseLoopController-inl.h.
References eventBase_, eventBaseKeepAlive_, fm_, folly::getKeepAliveToken(), folly::fibers::FiberManager::hasReadyTasks(), folly::fibers::FiberManager::hasTasks(), loopRunner_, folly::fibers::FiberManager::loopUntilNoReadyImpl(), and folly::fibers::InlineFunctionRunner::run().
Referenced by folly::fibers::EventBaseLoopController::ControllerCallback::runLoopCallback(), and scheduleThreadSafe().
|
inlineoverrideprivatevirtual |
Called by FiberManager to schedule the loop function run at some point in the futufre.
Implements folly::fibers::LoopController.
Definition at line 51 of file EventBaseLoopController-inl.h.
References awaitingScheduling_, callback_, eventBase_, eventBaseKeepAlive_, folly::VirtualEventBase::getEventBase(), folly::getKeepAliveToken(), and folly::EventBase::runInLoop().
Referenced by attachEventBase().
|
inlineoverrideprivatevirtual |
Same as schedule(), but safe to call from any thread.
Implements folly::fibers::LoopController.
Definition at line 87 of file EventBaseLoopController-inl.h.
References eventBase_, eventBaseAttached_, eventBaseKeepAlive_, fm_, folly::getKeepAliveToken(), folly::fibers::FiberManager::hasTasks(), folly::VirtualEventBase::runInEventBaseThread(), runLoop(), and folly::fibers::FiberManager::shouldRunLoopRemote().
|
inlineoverrideprivatevirtual |
Called by FiberManager to associate itself with the LoopController.
Implements folly::fibers::LoopController.
Definition at line 47 of file EventBaseLoopController-inl.h.
References fm_.
|
inline |
Definition at line 42 of file EventBaseLoopController.h.
References loopRunner_.
|
inlineoverrideprivatevirtual |
Called by FiberManager to schedule some function to be run at some time.
Implements folly::fibers::LoopController.
Definition at line 107 of file EventBaseLoopController-inl.h.
References count, eventBase_, eventBaseAttached_, now(), folly::TimeoutManager::tryRunAfterDelay(), and uint32_t.
|
friend |
Definition at line 76 of file EventBaseLoopController.h.
|
private |
Definition at line 60 of file EventBaseLoopController.h.
Referenced by attachEventBase(), and schedule().
|
private |
Definition at line 63 of file EventBaseLoopController.h.
Referenced by schedule(), and ~EventBaseLoopController().
|
private |
Definition at line 61 of file EventBaseLoopController.h.
Referenced by attachEventBase(), getEventBase(), runLoop(), schedule(), scheduleThreadSafe(), and timedSchedule().
|
private |
Definition at line 65 of file EventBaseLoopController.h.
Referenced by attachEventBase(), scheduleThreadSafe(), and timedSchedule().
|
private |
Definition at line 62 of file EventBaseLoopController.h.
Referenced by runLoop(), schedule(), scheduleThreadSafe(), and ~EventBaseLoopController().
|
private |
Definition at line 64 of file EventBaseLoopController.h.
Referenced by runLoop(), scheduleThreadSafe(), and setFiberManager().
|
private |
Definition at line 66 of file EventBaseLoopController.h.
Referenced by runLoop(), and setLoopRunner().