co_withExecutor overloads

Synopses

Declared in <folly/coro/Task.h>

Attaches an executor to the wrapped task, yielding a task‐with‐executor.

Cfg::TaskWithExecutorT
co_withExecutor(
    Executor::KeepAlive<> executor,
    Derived tw) noexcept;

Specify the executor that this task should execute on: co_withExecutor(executor, std::move(task))

Return Value

  • The wrapped task‐with‐executor.

  • a new TaskWithExecutor object, which represents the existing Task bound to an executor

Parameters

Name

Description

executor

The executor to attach.

tw

The wrapped task to attach the executor to.

task

the task to bind to the executor

Created with MrDocs