boost::capy::run_async

Asynchronously launch a lazy task with custom memory resource.

Synopsis

template<Executor Ex>
[[nodiscard]]
auto
run_async(
    Ex ex,
    std::pmr::memory_resource* mr);

Description

The memory resource is used for coroutine frame allocation. The caller is responsible for ensuring the memory resource outlives all tasks.

Return Value

A wrapper that accepts a task<T> for immediate execution.

Parameters

Name Description

ex

The executor to execute the task on.

mr

The memory resource for frame allocation.

See Also

task

executor

Created with MrDocs