folly::STTimerFDTimeoutManager

A TimeoutManager backed by a TimerFD that tracks a single timeout.

Synopsis

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

class STTimerFDTimeoutManager
    : public TimeoutManager

Base Classes

NameDescription
TimeoutManagerBase interface to be implemented by all classes expecting to manage timeouts. AsyncTimeout will use implementations of this interface to schedule/cancel timeouts.

Type Aliases

NameDescription
Func Callback type invoked when a timeout fires.
timeout_type Millisecond-resolution timeout duration.
timeout_type_high_res Microsecond-resolution timeout duration.

Enums

NameDescription
InternalEnum Distinguishes internal timeouts from normal ones.

Member Functions

NameDescription
STTimerFDTimeoutManager [constructor]Constructors
~STTimerFDTimeoutManager [destructor] [virtual]Destroys the manager.
operator= Assignment operators
attachTimeoutManager [virtual]Attaches TimeoutManager to AsyncTimeout
bumpHandlingTime [virtual]This is used to mark the beginning of a new loop cycle by the first handler fired within that cycle.
cancelTimeout [virtual]Cancels the AsyncTimeout, if scheduled
detachTimeoutManager [virtual]Detaches the TimeoutManager from an AsyncTimeout.
isInTimeoutManagerThread [virtual]Helper method to know whether we are running in the timeout manager thread
onTimeout [virtual]Called when the underlying timer fires.
runAfterDelay Runs the given Cob at some time after the specified number of milliseconds. (No guarantees exactly when.)
scheduleTimeout [virtual]Schedules AsyncTimeout to fire after timeout milliseconds
scheduleTimeoutHighRes [virtual]Schedules AsyncTimeout to fire after timeout microseconds
tryRunAfterDelay Attempts to run the given Cob after the specified delay.

Protected Member Functions

NameDescription
clearCobTimeouts Cancels and clears all callback timeouts registered via runAfterDelay.