Light-weight view onto an existing EventBase.
Declared in <folly/io/async/VirtualEventBase.h>
class VirtualEventBase
: public folly::TimeoutManager
, public folly::SequencedExecutor
| Name | Description |
|---|---|
folly::TimeoutManager | Base interface to be implemented by all classes expecting to manage timeouts. AsyncTimeout will use implementations of this interface to schedule/cancel timeouts. |
folly::SequencedExecutor | An executor that sequences tasks whose submissions were sequenced. |
| Name | Description |
|---|---|
Func | Callback type invoked when a timeout fires. |
KeepAlive | Alias for ExecutorKeepAlive, a safe pointer to an Executor. |
timeout_type | Millisecond-resolution timeout duration. |
timeout_type_high_res | Microsecond-resolution timeout duration. |
| Name | Description |
|---|---|
InternalEnum | Distinguishes internal timeouts from normal ones. |
| Name | Description |
|---|---|
VirtualEventBase [constructor] | Constructors |
~VirtualEventBase [destructor] [virtual] | Blocks until all keep-alive tokens are released and tasks complete. |
operator= [deleted] | Deleted copy assignment. |
add | add overloads |
addWithPriority [virtual] | Enqueue a function with a given priority, where 0 is the medium priority This is up to the implementation to enforce |
attachTimeoutManager | attachTimeoutManager overloads |
bumpHandlingTime [virtual] | Bumps the handling time of the backing EventBase. |
cancelTimeout [virtual] | Cancels a scheduled timeout on the backing EventBase. |
detachTimeoutManager [virtual] | Detaches a timeout from the backing EventBase. |
getEventBase | Returns the backing EventBase. |
getNumPriorities [virtual] | Returns the number of priority levels this executor supports. |
inRunningEventBaseThread | Returns whether the caller runs in the backing EventBase thread. |
isInTimeoutManagerThread [virtual] | Returns whether the caller runs in the backing EventBase thread. |
runAfterDelay | Runs the given Cob at some time after the specified number of milliseconds. (No guarantees exactly when.) |
runInEventBaseThread | VirtualEventBase destructor blocks until all tasks scheduled through its runInEventBaseThread are complete. |
runOnDestruction | runOnDestruction overloads |
scheduleTimeout | scheduleTimeout overloads |
scheduleTimeoutHighRes [virtual] | Schedules AsyncTimeout to fire after timeout microseconds |
timer | Returns the timer of the backing EventBase. |
tryRunAfterDelay | Attempts to run the given Cob after the specified delay. |
| Name | Description |
|---|---|
getKeepAliveToken | getKeepAliveToken overloads |
invokeCatchingExns | Invokes f, logging and swallowing any exception it throws. |
| Name | Description |
|---|---|
HI_PRI | Highest schedulable priority. |
LO_PRI | Lowest schedulable priority. |
MID_PRI | Medium (default) schedulable priority. |
| Name | Description |
|---|---|
clearCobTimeouts | Cancels and clears all callback timeouts registered via runAfterDelay. |
keepAliveAcquire [virtual] | Acquires a keep-alive token on this VirtualEventBase. |
keepAliveRelease [virtual] | Releases a keep-alive token on this VirtualEventBase. |
| Name | Description |
|---|---|
isKeepAliveDummy | Returns true if the KeepAlive is constructed from an executor that does not support the keep alive ref-counting functionality |
keepAliveAcquire | Acquires a keep-alive reference on executor. |
keepAliveRelease | Releases a keep-alive reference on executor. |
makeKeepAlive | Makes a counted (non-dummy, non-alias) keep-alive referring to executor. |
| Name | Description |
|---|---|
folly::EventBase | An event loop that drives asynchronous I/O and timers. |
| Name | Description |
|---|---|
async_tracing::logFutureVia | Trace hook invoked when a Future is rescheduled onto an executor. |
async_tracing::logGetGlobalCPUExecutor | Trace hook invoked when the global CPU executor is retrieved. |
async_tracing::logGetImmutableCPUExecutor | Trace hook invoked when the immutable CPU executor is retrieved. |
async_tracing::logSemiFutureVia | Trace hook invoked when a SemiFuture is rescheduled onto an executor. |
async_tracing::logSetGlobalCPUExecutor | Trace hook invoked when the global CPU executor is set. |