20#ifndef RIPPLE_SERVER_SPAWN_H_INCLUDED
21#define RIPPLE_SERVER_SPAWN_H_INCLUDED
23#include <xrpl/basics/Log.h>
25#include <boost/asio/spawn.hpp>
26#include <boost/asio/strand.hpp>
37 boost::asio::strand<typename std::decay_t<T>::inner_executor_type>>;
58 JLOG(
debugLog().warn()) <<
"Spawn exception: " << e.
what();
63 JLOG(
debugLog().warn()) <<
"Spawn exception: Unknown";
84template <
typename Ctx,
typename F>
99 boost::asio::make_strand(
constexpr auto kPROPAGATE_EXCEPTIONS
A completion handler that restores boost::asio::spawn's behaviour from Boost 1.83.
void spawn(Ctx &&ctx, F &&func)
Spawns a coroutine using boost::asio::spawn
beast::Journal debugLog()
Returns a debug journal.
T rethrow_exception(T... args)