Thread System 0.3.1
High-performance C++20 thread pool with work stealing and DAG scheduling
Loading...
Searching...
No Matches
kcenon::thread::pool_promise< void > Class Reference

Specialization for void type. More...

#include <future_extensions.h>

Collaboration diagram for kcenon::thread::pool_promise< void >:
Collaboration graph

Public Member Functions

pool_future< void > get_future ()
 
void set_value ()
 
void set_exception (std::exception_ptr exception)
 
void set_value_at_thread_exit ()
 
void set_exception_at_thread_exit (std::exception_ptr exception)
 

Private Attributes

std::promise< void > promise_
 

Detailed Description

Specialization for void type.

Definition at line 150 of file future_extensions.h.

Member Function Documentation

◆ get_future()

pool_future< void > kcenon::thread::pool_promise< void >::get_future ( )
inline

Definition at line 152 of file future_extensions.h.

152 {
153 return pool_future<void>{promise_.get_future()};
154 }

References kcenon::thread::pool_promise< T >::promise_.

◆ set_exception()

void kcenon::thread::pool_promise< void >::set_exception ( std::exception_ptr exception)
inline

Definition at line 160 of file future_extensions.h.

160 {
161 promise_.set_exception(exception);
162 }

References kcenon::thread::pool_promise< T >::promise_.

◆ set_exception_at_thread_exit()

void kcenon::thread::pool_promise< void >::set_exception_at_thread_exit ( std::exception_ptr exception)
inline

Definition at line 168 of file future_extensions.h.

168 {
169 promise_.set_exception_at_thread_exit(exception);
170 }

References kcenon::thread::pool_promise< T >::promise_.

◆ set_value()

void kcenon::thread::pool_promise< void >::set_value ( )
inline

Definition at line 156 of file future_extensions.h.

156 {
157 promise_.set_value();
158 }

References kcenon::thread::pool_promise< T >::promise_.

◆ set_value_at_thread_exit()

void kcenon::thread::pool_promise< void >::set_value_at_thread_exit ( )
inline

Definition at line 164 of file future_extensions.h.

164 {
165 promise_.set_value_at_thread_exit();
166 }

References kcenon::thread::pool_promise< T >::promise_.

Member Data Documentation

◆ promise_

std::promise<void> kcenon::thread::pool_promise< void >::promise_
private

Definition at line 173 of file future_extensions.h.


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