Corium 1.1.0
High-Performance Zero-Heap C++20 MPSC Application Runtime
Loading...
Searching...
No Matches
corium::async Namespace Reference

Namespaces

namespace  detail
 

Classes

class  AsyncEvent
 Lock-free single-waiter asynchronous event channel for C++20 coroutines. Enables event-driven coroutine resumption without blocking threads or allocating dynamic memory. More...
 
class  AsyncEvent< void >
 Specialization of AsyncEvent for void signaling. More...
 
class  AsyncSemaphore
 Asynchronous counting semaphore for cooperative coroutine concurrency throttling. More...
 
class  CancellationToken
 Lightweight, zero-heap cooperative cancellation token for C++20 coroutines and services. More...
 
class  Channel
 Statically allocated bounded asynchronous channel for typed producer-consumer coroutines. More...
 
struct  DelayAwaiter
 Awaitable that pauses the coroutine thread for the specified duration. More...
 
class  Generator
 Zero-heap C++20 pull-based lazy generator sequence with configurable frame allocator. Compatible with range-based for loops and standard C++20 ranges. More...
 
struct  HeapFrameAllocator
 Default heap allocator policy for C++20 coroutine frames (HALO-eligible). More...
 
struct  StaticFrameAllocator
 Allocator policy adapter wrapping a StaticFramePool. More...
 
class  StaticFramePool
 Statically-allocated fixed-capacity memory pool for coroutine state frames. Eliminates heap allocations and guarantees deterministic O(1) coroutine frame allocation. More...
 
class  Task
 Lightweight C++20 coroutine task with zero-heap resumption chaining and configurable frame allocator. More...
 
class  Task< void, Allocator >
 Specialization of Task for void return type with configurable frame allocator. More...
 
struct  WhenAnyResult
 Result container for whenAny combinator. More...
 
struct  YieldAwaiter
 Awaitable that yields control back to the caller/event loop once. More...
 

Typedefs

template<typename T , std::size_t MaxFrames = 16, std::size_t FrameSize = 256>
using PooledGenerator = Generator< T, StaticFrameAllocator< MaxFrames, FrameSize > >
 Pre-configured zero-heap statically-pooled lazy generator sequence.
 
template<typename T = void, std::size_t MaxFrames = 16, std::size_t FrameSize = 256>
using PooledTask = Task< T, StaticFrameAllocator< MaxFrames, FrameSize > >
 Pre-configured zero-heap statically-pooled coroutine task.
 

Functions

template<typename Rep , typename Period >
auto delay (const std::chrono::duration< Rep, Period > &d) noexcept
 Helper to suspend coroutine for a given std::chrono duration.
 
template<typename... Tasks>
auto whenAll (Tasks &&... tasks)
 Awaits concurrent or sequential completion of multiple Task coroutines.
 
template<typename... Tasks>
auto whenAny (Tasks &&... tasks)
 Awaits the first task among multiple tasks to complete.
 
constexpr YieldAwaiter yield () noexcept
 Helper to yield execution in a coroutine.
 

Typedef Documentation

◆ PooledGenerator

template<typename T , std::size_t MaxFrames = 16, std::size_t FrameSize = 256>
using corium::async::PooledGenerator = typedef Generator<T, StaticFrameAllocator<MaxFrames, FrameSize> >

Pre-configured zero-heap statically-pooled lazy generator sequence.

◆ PooledTask

template<typename T = void, std::size_t MaxFrames = 16, std::size_t FrameSize = 256>
using corium::async::PooledTask = typedef Task<T, StaticFrameAllocator<MaxFrames, FrameSize> >

Pre-configured zero-heap statically-pooled coroutine task.

Function Documentation

◆ delay()

template<typename Rep , typename Period >
auto corium::async::delay ( const std::chrono::duration< Rep, Period > &  d)
inlinenoexcept

Helper to suspend coroutine for a given std::chrono duration.

◆ yield()

constexpr YieldAwaiter corium::async::yield ( )
inlineconstexprnoexcept

Helper to yield execution in a coroutine.