folly::coro::safe_task_with_executor

A safe_task that has been bound to an executor and is ready to run.

Synopsis

Declared in <folly/coro/safe/SafeTask.h>

template<
    safe_alias ArgSafety,
    typename T = void>
class [[nodiscard]] safe_task_with_executor final
    : public /* implementation-defined */::type

Description

IMPORTANT: This omits start() because backgrounded tasks can easily outlive the references they took, defeating the purpose of safe_task. See BackgroundTask instead.

Base Classes

NameDescription
/* implementation-defined */::type

Type Aliases

NameDescription
folly_private_safe_alias_t Reports the safe-alias level of this task to the SafeAlias machinery.

Member Functions

NameDescription
as_unsafe [deprecated]Unwraps this into a plain TaskWithExecutor, dropping the safety guarantees.

Protected Using Declarations

Name
Unnamed using

Friends

NameDescription
folly::coro::BackgroundTaskA task that runs detached in the background; forward-declared here.

Return Value

NOTE

The return value should not be discarded.