proxygen
|
#include <ScheduledExecutor.h>
Public Types | |
typedef std::chrono::microseconds | Duration |
typedef std::chrono::steady_clock::time_point | TimePoint |
Public Member Functions | |
~ScheduledExecutor () override=default | |
void | add (Func) override=0 |
void | schedule (Func &&a) |
Alias for add() (for Rx consistency) More... | |
void | schedule (Func &&a, Duration const &dur) |
virtual void | scheduleAt (Func &&, TimePoint const &) |
virtual TimePoint | now () |
Get this executor's notion of time. Must be threadsafe. More... | |
Public Member Functions inherited from folly::Executor | |
virtual | ~Executor () |
virtual void | addWithPriority (Func, int8_t priority) |
virtual uint8_t | getNumPriorities () const |
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 |
Protected Member Functions inherited from folly::Executor | |
virtual bool | keepAliveAcquire () |
virtual void | keepAliveRelease () |
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) |
Definition at line 28 of file ScheduledExecutor.h.
typedef std::chrono::microseconds folly::ScheduledExecutor::Duration |
Definition at line 32 of file ScheduledExecutor.h.
typedef std::chrono::steady_clock::time_point folly::ScheduledExecutor::TimePoint |
Definition at line 33 of file ScheduledExecutor.h.
|
overridedefault |
|
overridepure virtual |
Enqueue a function to executed by this executor. This and all variants must be threadsafe.
Implements folly::Executor.
Implemented in folly::EventBase, and folly::ManualExecutor.
Referenced by schedule().
|
inlinevirtual |
Get this executor's notion of time. Must be threadsafe.
Reimplemented in folly::ManualExecutor.
Definition at line 57 of file ScheduledExecutor.h.
References now().
Referenced by folly::EventBase::loopBody(), schedule(), folly::EventBase::scheduleAt(), fizz::server::test::TEST(), and TEST().
|
inline |
Alias for add() (for Rx consistency)
Definition at line 40 of file ScheduledExecutor.h.
References a, add(), and folly::gen::move.
Referenced by TEST().
Schedule a Func to be executed after dur time has elapsed Expect millisecond resolution at best.
Definition at line 46 of file ScheduledExecutor.h.
References a, folly::gen::move, now(), and scheduleAt().
Schedule a Func to be executed at time t, or as soon afterward as possible. Expect millisecond resolution at best. Must be threadsafe.
Reimplemented in folly::EventBase, and folly::ManualExecutor.
Definition at line 52 of file ScheduledExecutor.h.
Referenced by schedule().