23template <
typename T,
typename Allocator>
25 auto t =
co_spawn(runtime, std::move(coro));
52 return sync_wait(runtime, std::move(coro));
Coroutine type used to define a coroutine function.
The event loop runtime for executing asynchronous.
void allow_exit() noexcept
Allow the runtime to exit when there are no pending works.
void run() noexcept
Run the runtime event loop in the current thread.
The main namespace for the Condy library.
RuntimeOptions & default_runtime_options()
Get the default runtime options. This options will be used when using sync_wait without specifying ru...
T sync_wait(Runtime &runtime, Coro< T, Allocator > coro)
Synchronously wait for a coroutine to complete in the given runtime.
Task< T, Allocator > co_spawn(Runtime &runtime, Coro< T, Allocator > coro)
Spawn a coroutine as a task in the given runtime.
Runtime type for running the io_uring event loop.
Interfaces for coroutine task management.