Container System 0.1.0
High-performance C++20 type-safe container framework with SIMD-accelerated serialization
Loading...
Searching...
No Matches
kcenon::container::async::detail::promise_base Struct Reference

Base promise type with common functionality. More...

#include <task.h>

Inheritance diagram for kcenon::container::async::detail::promise_base:
Inheritance graph
Collaboration diagram for kcenon::container::async::detail::promise_base:
Collaboration graph

Classes

struct  final_awaiter
 Final awaiter that resumes the continuation. More...
 

Public Member Functions

std::suspend_never initial_suspend () noexcept
 Never suspend at start - start executing immediately.
 
void unhandled_exception () noexcept
 Handle unhandled exceptions.
 
final_awaiter final_suspend () noexcept
 Suspend at final point to allow result retrieval.
 

Public Attributes

std::exception_ptr exception_
 
std::coroutine_handle continuation_
 
std::atomic< bool > completed_ {false}
 

Detailed Description

Base promise type with common functionality.

Definition at line 49 of file task.h.

Member Function Documentation

◆ final_suspend()

final_awaiter kcenon::container::async::detail::promise_base::final_suspend ( )
inlinenodiscardnoexcept

Suspend at final point to allow result retrieval.

Definition at line 106 of file task.h.

107 {
108 return {};
109 }

◆ initial_suspend()

std::suspend_never kcenon::container::async::detail::promise_base::initial_suspend ( )
inlinenodiscardnoexcept

Never suspend at start - start executing immediately.

Definition at line 58 of file task.h.

59 {
60 return {};
61 }

◆ unhandled_exception()

void kcenon::container::async::detail::promise_base::unhandled_exception ( )
inlinenoexcept

Handle unhandled exceptions.

Definition at line 66 of file task.h.

67 {
68 exception_ = std::current_exception();
69 }

References exception_.

Member Data Documentation

◆ completed_

std::atomic<bool> kcenon::container::async::detail::promise_base::completed_ {false}

Definition at line 53 of file task.h.

53{false};

◆ continuation_

std::coroutine_handle kcenon::container::async::detail::promise_base::continuation_

Definition at line 52 of file task.h.

◆ exception_


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