xrpld
Loading...
Searching...
No Matches
xrpl::util Namespace Reference

Namespaces

namespace  impl

Functions

template<typename Ctx, typename F>
void spawn (Ctx &&ctx, F &&func)
 Spawns a coroutine using boost::asio::spawn.

Function Documentation

◆ spawn()

template<typename Ctx, typename F>
void xrpl::util::spawn ( Ctx && ctx,
F && func )

Spawns a coroutine using boost::asio::spawn.

Note
This uses kPropagateExceptions to force asio to propagate exceptions through io_context
Since implicit strand was removed from boost::asio::spawn this helper function adds the strand back
Template Parameters
CtxThe type of the context/strand
FThe type of the function to execute
Parameters
ctxThe execution context
funcThe function to execute. Must return void

Definition at line 66 of file Spawn.h.