proxygen
|
#include <ThreadWheelTimekeeper.h>
Public Member Functions | |
ThreadWheelTimekeeper () | |
But it doesn't have to be a singleton. More... | |
~ThreadWheelTimekeeper () override | |
Future< Unit > | after (Duration) override |
Public Member Functions inherited from folly::Timekeeper | |
virtual | ~Timekeeper ()=default |
template<class Clock > | |
Future< Unit > | at (std::chrono::time_point< Clock > when) |
Protected Attributes | |
folly::EventBase | eventBase_ |
std::thread | thread_ |
HHWheelTimer::UniquePtr | wheelTimer_ |
The default Timekeeper implementation which uses a HHWheelTimer on an EventBase in a dedicated thread. Users needn't deal with this directly, it is used by default by Future methods that work with timeouts.
Definition at line 29 of file ThreadWheelTimekeeper.h.
folly::ThreadWheelTimekeeper::ThreadWheelTimekeeper | ( | ) |
But it doesn't have to be a singleton.
Definition at line 104 of file ThreadWheelTimekeeper.cpp.
References eventBase_, folly::EventBase::loopForever(), folly::HHWheelTimer::newTimer(), folly::EventBase::runInEventBaseThread(), folly::EventBase::setName(), folly::EventBase::waitUntilRunning(), and wheelTimer_.
|
override |
Definition at line 115 of file ThreadWheelTimekeeper.cpp.
References eventBase_, folly::EventBase::runInEventBaseThreadAndWait(), folly::EventBase::terminateLoopSoon(), thread_, and wheelTimer_.
Implement the Timekeeper interface This future does complete on the timer thread. You should almost certainly follow it with a via() call or the accuracy of other timers will suffer.
Implements folly::Timekeeper.
Definition at line 123 of file ThreadWheelTimekeeper.cpp.
References eventBase_, f, and folly::EventBase::runInEventBaseThread().
Referenced by TEST_F().
|
protected |
Definition at line 42 of file ThreadWheelTimekeeper.h.
Referenced by after(), ThreadWheelTimekeeper(), and ~ThreadWheelTimekeeper().
|
protected |
Definition at line 43 of file ThreadWheelTimekeeper.h.
Referenced by ~ThreadWheelTimekeeper().
|
protected |
Definition at line 44 of file ThreadWheelTimekeeper.h.
Referenced by ThreadWheelTimekeeper(), and ~ThreadWheelTimekeeper().