boost::capy::strand::strand

Construct a strand for the specified executor.

Synopsis

Declared in <boost/capy/ex/strand.hpp>

template<typename Ex1>
requires !std::is_same_v<std::decay_t<Ex1>, strand> &&
            !detail::is_strand<std::decay_t<Ex1>>::value &&
            std::is_convertible_v<Ex1, Ex>
explicit
strand(Ex1&& ex);

Description

Obtains a strand implementation from the service associated with the executor's context. The implementation is selected from a fixed pool using a hash function.

This constructor is disabled if the argument is a strand type, to prevent strand‐of‐strand wrapping.

Parameters

Name Description

ex

The inner executor to wrap. Coroutines will ultimately be dispatched through this executor.

Created with MrDocs