An Executor accepts units of work with add(), which should be threadsafe.
Synopsis
Declared in <folly/DefaultKeepAliveExecutor.h>
class DefaultKeepAliveExecutor
: public virtual Executor
Base Classes
Name |
Description |
Schedules and runs asynchronous work. |
Types
Name |
Description |
Marker base for the weak‐reference executor wrappers. |
Type Aliases
Name |
Description |
Alias for ExecutorKeepAlive, a safe pointer to an Executor. |
Member Functions
Name |
Description |
|
Destroys the executor, asserting its keep‐alive has already been joined. |
|
Enqueue a function to be executed by this executor. This and all variants must be threadsafe. |
|
Enqueue a function with a given priority, where 0 is the medium priority This is up to the implementation to enforce |
|
Returns the number of priority levels this executor supports. |
Returns a weak keep‐alive to this executor. |
Static Member Functions
Name |
Description |
|
|
Returns a weak keep‐alive to |
|
Invokes |
Static Data Members
Name |
Description |
Highest schedulable priority. |
|
Lowest schedulable priority. |
|
Medium (default) schedulable priority. |
Protected Member Functions
Name |
Description |
Joins the keep‐alive, then reinstates a fresh one so the executor is reusable. |
|
Releases this executor's own keep‐alive and waits for all others to drain. |
|
|
Acquire a keep alive token. Should return false if keep‐alive mechanism is not supported. |
|
Release a keep alive token previously acquired by keepAliveAcquire(). Will never be called if keepAliveAcquire() returns false. |
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 |
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. |
Derived Classes
Name |
Description |
Base class for implementing threadpool based executors. |
|
VirtualExecutor implements a light‐weight view onto existing Executor. |
Created with MrDocs