Light‐weight view onto an existing EventBase.
Synopsis
Declared in <folly/io/async/VirtualEventBase.h>
class VirtualEventBase
: public folly::TimeoutManager
, public folly::SequencedExecutor
Base Classes
Name |
Description |
Base interface to be implemented by all classes expecting to manage timeouts. AsyncTimeout will use implementations of this interface to schedule/cancel timeouts. |
|
An executor that sequences tasks whose submissions were sequenced. |
Type Aliases
Name |
Description |
Callback type invoked when a timeout fires. |
|
Alias for ExecutorKeepAlive, a safe pointer to an Executor. |
|
Millisecond‐resolution timeout duration. |
|
Microsecond‐resolution timeout duration. |
Enums
Name |
Description |
Distinguishes internal timeouts from normal ones. |
Member Functions
Name |
Description |
|
Constructors |
|
Blocks until all keep‐alive tokens are released and tasks complete. |
|
Deleted copy assignment. |
|
Runs the given function in the EventBase thread. |
|
Enqueue a function with a given priority, where 0 is the medium priority This is up to the implementation to enforce |
|
Attaches a timeout to the backing EventBase. |
|
Bumps the handling time of the backing EventBase. |
|
Cancels a scheduled timeout on the backing EventBase. |
|
Detaches a timeout from the backing EventBase. |
Returns the backing EventBase. |
|
|
Returns the number of priority levels this executor supports. |
Returns whether the caller runs in the backing EventBase thread. |
|
|
Returns whether the caller runs in the backing EventBase thread. |
Runs the given Cob at some time after the specified number of milliseconds. (No guarantees exactly when.) |
|
VirtualEventBase destructor blocks until all tasks scheduled through its runInEventBaseThread are complete. |
|
|
|
|
Schedules a timeout on the backing EventBase. |
|
Schedules AsyncTimeout to fire after |
Returns the timer of the backing EventBase. |
|
Attempts to run the given Cob after the specified delay. |
Static Member Functions
Name |
Description |
|
|
Invokes |
Static Data Members
Name |
Description |
Highest schedulable priority. |
|
Lowest schedulable priority. |
|
Medium (default) schedulable priority. |
Protected Member Functions
Name |
Description |
Cancels and clears all callback timeouts registered via runAfterDelay. |
|
|
Acquires a keep‐alive token on this VirtualEventBase. |
|
Releases a keep‐alive token on this VirtualEventBase. |
Protected Static Member Functions
Name |
Description |
Returns true if the KeepAlive is constructed from an executor that does not support the keep alive ref‐counting functionality |
|
Acquires a keep‐alive reference on |
|
Releases a keep‐alive reference on |
|
Makes a counted (non‐dummy, non‐alias) keep‐alive referring to |
Friends
Name |
Description |
An event loop that drives asynchronous I/O and timers. |
Non-Member Functions
Name |
Description |
Trace hook invoked when a Future is rescheduled onto an executor. |
|
Trace hook invoked when the global CPU executor is retrieved. |
|
|
Trace hook invoked when the immutable CPU executor is retrieved. |
Trace hook invoked when a SemiFuture is rescheduled onto an executor. |
|
Trace hook invoked when the global CPU executor is set. |
Created with MrDocs