proxygen
folly::ThreadPoolExecutor::Task Struct Reference

#include <ThreadPoolExecutor.h>

Inheritance diagram for folly::ThreadPoolExecutor::Task:
folly::CPUThreadPoolExecutor::CPUTask

Public Member Functions

 Task (Func &&func, std::chrono::milliseconds expiration, Func &&expireCallback)
 

Public Attributes

Func func_
 
TaskStats stats_
 
std::chrono::steady_clock::time_point enqueueTime_
 
std::chrono::milliseconds expiration_
 
Func expireCallback_
 
std::shared_ptr< folly::RequestContextcontext_
 

Detailed Description

Definition at line 191 of file ThreadPoolExecutor.h.

Constructor & Destructor Documentation

folly::ThreadPoolExecutor::Task::Task ( Func &&  func,
std::chrono::milliseconds  expiration,
Func &&  expireCallback 
)
explicit

Definition at line 59 of file ThreadPoolExecutor.cpp.

References enqueueTime_, and now().

63  : func_(std::move(func)),
65  expireCallback_(std::move(expireCallback)),
67  // Assume that the task in enqueued on creation
69 }
std::chrono::steady_clock::time_point enqueueTime_
std::chrono::steady_clock::time_point now()
constexpr detail::Map< Move > move
Definition: Base-inl.h:2567
std::shared_ptr< folly::RequestContext > context_
static void expiration()
static std::shared_ptr< RequestContext > saveContext()
Definition: Request.h:196
std::chrono::milliseconds expiration_

Member Data Documentation

std::shared_ptr<folly::RequestContext> folly::ThreadPoolExecutor::Task::context_

Definition at line 201 of file ThreadPoolExecutor.h.

std::chrono::steady_clock::time_point folly::ThreadPoolExecutor::Task::enqueueTime_

Definition at line 198 of file ThreadPoolExecutor.h.

Referenced by Task().

std::chrono::milliseconds folly::ThreadPoolExecutor::Task::expiration_

Definition at line 199 of file ThreadPoolExecutor.h.

Func folly::ThreadPoolExecutor::Task::expireCallback_

Definition at line 200 of file ThreadPoolExecutor.h.

Func folly::ThreadPoolExecutor::Task::func_

Definition at line 196 of file ThreadPoolExecutor.h.

TaskStats folly::ThreadPoolExecutor::Task::stats_

Definition at line 197 of file ThreadPoolExecutor.h.


The documentation for this struct was generated from the following files: