boost::capy::executor_ref::dispatch

Dispatches a coroutine handle through the wrapped executor.

Synopsis

std::coroutine_handle
dispatch(std::coroutine_handle h) const;

Description

Returns a handle for symmetric transfer. If running in the executor's thread, returns h. Otherwise, posts the coroutine for later execution and returns std::noop_coroutine().

Return Value

A handle for symmetric transfer or std::noop_coroutine().

Parameters

Name Description

h

The coroutine handle to dispatch for resumption.

Preconditions

  • This instance was constructed with a valid executor.

Created with MrDocs