Corium 1.1.0
High-Performance Zero-Heap C++20 MPSC Application Runtime
Loading...
Searching...
No Matches
Delay.hpp File Reference

Non-blocking timer delay and yield awaitables for C++20 coroutines. More...

#include <chrono>
#include <coroutine>
#include <thread>
+ Include dependency graph for Delay.hpp:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  corium::async::DelayAwaiter< Rep, Period >
 Awaitable that pauses the coroutine thread for the specified duration. More...
 
struct  corium::async::YieldAwaiter
 Awaitable that yields control back to the caller/event loop once. More...
 

Namespaces

namespace  corium
 
namespace  corium::async
 

Functions

template<typename Rep , typename Period >
auto corium::async::delay (const std::chrono::duration< Rep, Period > &d) noexcept
 Helper to suspend coroutine for a given std::chrono duration.
 
constexpr YieldAwaiter corium::async::yield () noexcept
 Helper to yield execution in a coroutine.
 

Detailed Description

Non-blocking timer delay and yield awaitables for C++20 coroutines.