folly::CPUThreadPoolExecutor::CPUTask

A unit of work executed by the CPUThreadPoolExecutor.

Synopsis

Declared in <folly/executors/CPUThreadPoolExecutor.h>

struct CPUTask
    : ThreadPoolExecutor::Task

Base Classes

NameDescription
ThreadPoolExecutor::TaskA unit of work enqueued in the executor along with its metadata.

Types

NameDescription
Expiration Expiration policy pairing a timeout with a callback.

Member Functions

NameDescription
CPUTask [constructor]Constructors
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::CPUThreadPoolExecutorA Thread pool for CPU bound tasks.