folly::ThreadPoolExecutor::Task

A unit of work enqueued in the executor along with its metadata.

Synopsis

Declared in <folly/executors/ThreadPoolExecutor.h>

struct Task;

Types

NameDescription
Expiration Expiration policy pairing a timeout with a callback.

Member Functions

NameDescription
Task [constructor]Constructs a task from a function and its scheduling metadata.
priority Returns the scheduling priority of the task.

Data Members

NameDescription
context_ Request context captured when the task was enqueued.
enqueueTime_ Time when the task was enqueued.
expiration_ Optional expiration policy for this task.
func_ The callable to execute.

Friends

NameDescription
folly::ThreadPoolExecutorBase class for implementing threadpool based executors.

Derived Classes

NameDescription
CPUTask A unit of work executed by the CPUThreadPoolExecutor.