3#include <boost/asio/spawn.hpp>
4#include <boost/asio/strand.hpp>
15 same_as<std::decay_t<T>, boost::asio::strand<typename std::decay_t<T>::inner_executor_type>>;
32 std::rethrow_exception(ePtr);
34} kPROPAGATE_EXCEPTIONS;
50template <
typename Ctx,
typename F>
51 requires std::is_invocable_r_v<void, F, boost::asio::yield_context>
57 std::forward<Ctx>(ctx), std::forward<F>(func), impl::kPROPAGATE_EXCEPTIONS
61 boost::asio::make_strand(std::forward<Ctx>(ctx).get_executor()),
62 std::forward<F>(func),
63 impl::kPROPAGATE_EXCEPTIONS
This namespace contains various utilities.
Definition AccountUtils.hpp:11
void spawn(Ctx &&ctx, F &&func)
Spawns a coroutine using boost::asio::spawn.
Definition Spawn.hpp:53
A completion handler that restores boost::asio::spawn's behaviour from Boost 1.83.
Definition Spawn.hpp:23
void operator()(std::exception_ptr ePtr)
The completion handler.
Definition Spawn.hpp:29