Container System 0.1.0
High-performance C++20 type-safe container framework with SIMD-accelerated serialization
Loading...
Searching...
No Matches
kcenon::container::async::task< T >::awaiter Struct Reference

Awaitable interface. More...

#include <task.h>

Collaboration diagram for kcenon::container::async::task< T >::awaiter:
Collaboration graph

Public Member Functions

bool await_ready () const noexcept
 Check if the coroutine is already done.
 
std::coroutine_handle await_suspend (std::coroutine_handle<> awaiting) noexcept
 Suspend and set continuation.
 
decltype(auto) await_resume ()
 Get the result when resumed.
 

Public Attributes

handle_type handle_
 

Detailed Description

template<typename T>
struct kcenon::container::async::task< T >::awaiter

Awaitable interface.

Definition at line 309 of file task.h.

Member Function Documentation

◆ await_ready()

template<typename T >
bool kcenon::container::async::task< T >::awaiter::await_ready ( ) const
inlinenodiscardnoexcept

Check if the coroutine is already done.

Definition at line 316 of file task.h.

317 {
318 return handle_.done();
319 }

References kcenon::container::async::task< T >::awaiter::handle_.

◆ await_resume()

template<typename T >
decltype(auto) kcenon::container::async::task< T >::awaiter::await_resume ( )
inlinenodiscard

Get the result when resumed.

Definition at line 334 of file task.h.

335 {
336 return handle_.promise().result();
337 }

References kcenon::container::async::task< T >::awaiter::handle_.

◆ await_suspend()

template<typename T >
std::coroutine_handle kcenon::container::async::task< T >::awaiter::await_suspend ( std::coroutine_handle<> awaiting)
inlinenoexcept

Suspend and set continuation.

Definition at line 324 of file task.h.

326 {
327 handle_.promise().continuation_ = awaiting;
328 return handle_;
329 }

References kcenon::container::async::task< T >::awaiter::handle_.

Member Data Documentation

◆ handle_


The documentation for this struct was generated from the following file: