folly::HHWheelTimerBase<std::chrono::microseconds>

Synopsis

Declared in <folly/io/async/HHWheelTimer.h>

template<>
class HHWheelTimerBase<std::chrono::microseconds>
    : public folly::DelayedDestruction

Base Classes

NameDescription
folly::DelayedDestructionDelayedDestruction is a helper class to ensure objects are not deleted while they still have functions executing in a higher stack frame.

Types

NameDescription
Callback A callback to be notified when a timeout has expired.
Destructor Helper class to allow DelayedDestruction classes to be used with std::shared_ptr.
DestructorGuard Classes should create a DestructorGuard object on the stack in any function that may invoke callback functions.
IntrusivePtr This smart pointer is a convenient way to manage a concrete DelayedDestructorBase child. It can replace the equivalent raw pointer and provide automatic memory management.

Type Aliases

NameDescription
SharedPtr Shared pointer to a timer.
UniquePtr Unique pointer that destroys the timer via DelayedDestruction.

Member Functions

NameDescription
HHWheelTimerBase [constructor]Create a new HHWheelTimerBase with the specified interval and the default timeout value set.
operator= [deleted]Deleted copy assignment operator.
cancelAll Cancel all outstanding timeouts
count Return the number of currently pending timeouts
destroy [virtual]destroy() requests destruction of the object.
getDefaultTimeout Get the default timeout interval for this HHWheelTimerBase.
getDestroyPending Returns whether destruction has been requested but deferred.
getTickInterval Get the tick interval for this HHWheelTimerBase.
isDetachable Returns whether the timer can be detached from its event base.
scheduleTimeout scheduleTimeout overloads
scheduleTimeoutFn Schedule a callable to be invoked after the specified timeout interval.
setDefaultTimeout Set the default timeout interval for this HHWheelTimerBase.

Static Member Functions

NameDescription
newTimer Creates a new timer wrapped in a UniquePtr.

Static Data Members

NameDescription
DEFAULT_TICK_INTERVAL Default tick interval, in the timer's duration units.

Using Declarations

NameDescription
attachEventBase Attaches the timer to an EventBase.
detachEventBase Detaches the timer from its EventBase.
getTimeoutManager Returns the TimeoutManager driving the timer.

Protected Member Functions

NameDescription
~HHWheelTimerBase [destructor] [virtual]Protected destructor.
getDestructorGuardCount Get the number of DestructorGuards currently protecting this object.
onDelayedDestroy [virtual]Implement onDelayedDestroy in subclasses. onDelayedDestroy() is invoked when the object is potentially being destroyed.