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

Name

Description

/* implementation-defined */::type

Type Aliases

Name

Description

folly_private_safe_alias_t

Reports the safe‐alias level of this task to the SafeAlias machinery.

Member Functions

Name

Description

as_unsafe [deprecated]

Unwraps this into a plain TaskWithExecutor, dropping the safety guarantees.

Protected Using Declarations

Friends

Name

Description

folly::coro::BackgroundTask

A task that runs detached in the background; forward‐declared here.

Return Value

Note

The return value should not be discarded.

Created with MrDocs