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