A DrivableExecutor can be driven via its drive() method or its driveUntil() that drives until some time point.
Declared in <folly/executors/TimedDrivableExecutor.h>
class TimedDrivableExecutor
: public DrivableExecutor
| Name | Description |
|---|---|
DrivableExecutor | An executor that can be driven forward via its drive() method. |
| Name | Description |
|---|---|
KeepAlive | Alias for ExecutorKeepAlive, a safe pointer to an Executor. |
| Name | Description |
|---|---|
TimedDrivableExecutor [constructor] | Construct an empty executor. |
~TimedDrivableExecutor [destructor] [virtual] | Destroy the executor. |
add [virtual] | Enqueue a function to be run when the executor is driven. |
addWithPriority [virtual] | Enqueue a function with a given priority, where 0 is the medium priority This is up to the implementation to enforce |
drain | Do work until there is no more work to do. Returns the number of functions that were executed (maybe 0). Unlike run, this method is not stable. It will chase an infinite tail of work so should be used with care. There will be no work available to perform at the moment that this returns. |
drive [virtual] | Implements DrivableExecutor |
getNumPriorities [virtual] | Returns the number of priority levels this executor supports. |
run | Do work. Returns the number of functions that were executed (maybe 0). Non-blocking, in the sense that we don't wait for work (we can't control whether one of the functions blocks). This is stable, it will not chase an ever-increasing tail of work. This also means, there may be more work available to perform at the moment that this returns. |
try_drive | Make progress if there is work to do and return true. Otherwise return false. |
try_drive_for | Make progress on this Executor's work. Acts as drive, except it will only wait for a period of timeout for work to be enqueued. If no work is enqueued by that point, it will return. |
try_drive_until | Make progress on this Executor's work. Acts as drive, except it will only wait until deadline for work to be enqueued. If no work is enqueued by that point, it will return. |
try_wait | Return true if there is work to do, false otherwise |
try_wait_for | Wait for work to do or for a period of timeout, whichever is sooner. |
try_wait_until | Wait for work to do or until deadline passes, whichever is sooner. |
wait | Wait for work to do. |
| 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 |
|---|---|
keepAliveAcquire [virtual] | Acquire a keep alive token. Should return false if keep-alive mechanism is not supported. |
keepAliveRelease [virtual] | Release a keep alive token previously acquired by keepAliveAcquire(). Will never be called if keepAliveAcquire() returns false. |
| 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 |
|---|---|
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. |