|
Thread System 0.3.1
High-performance C++20 thread pool with work stealing and DAG scheduling
|
A promise that can schedule work on a thread pool. More...
#include <future_extensions.h>

Public Types | |
| using | value_type = T |
Public Member Functions | |
| pool_promise ()=default | |
| Default constructor. | |
| pool_future< T > | get_future () |
| Get the associated future. | |
| void | set_value (const T &value) |
| Set the value. | |
| void | set_value (T &&value) |
| Set the value (move) | |
| void | set_exception (std::exception_ptr exception) |
| Set an exception. | |
| void | set_value_at_thread_exit (const T &value) |
| Set the value at thread exit. | |
| void | set_exception_at_thread_exit (std::exception_ptr exception) |
| Set an exception at thread exit. | |
Private Attributes | |
| std::promise< T > | promise_ |
A promise that can schedule work on a thread pool.
Definition at line 91 of file future_extensions.h.
| using kcenon::thread::pool_promise< T >::value_type = T |
Definition at line 93 of file future_extensions.h.
|
default |
Default constructor.
|
inline |
Get the associated future.
Definition at line 103 of file future_extensions.h.
References kcenon::thread::pool_promise< T >::promise_.
Referenced by kcenon::thread::make_exceptional_future(), kcenon::thread::make_ready_future(), and kcenon::thread::make_ready_future().

|
inline |
Set an exception.
Definition at line 124 of file future_extensions.h.
References kcenon::thread::pool_promise< T >::promise_.
Referenced by kcenon::thread::make_exceptional_future().

|
inline |
Set an exception at thread exit.
Definition at line 138 of file future_extensions.h.
References kcenon::thread::pool_promise< T >::promise_.
|
inline |
Set the value.
Definition at line 110 of file future_extensions.h.
References kcenon::thread::pool_promise< T >::promise_.
Referenced by kcenon::thread::make_ready_future(), and kcenon::thread::make_ready_future().

|
inline |
Set the value (move)
Definition at line 117 of file future_extensions.h.
References kcenon::thread::pool_promise< T >::promise_.
|
inline |
Set the value at thread exit.
Definition at line 131 of file future_extensions.h.
References kcenon::thread::pool_promise< T >::promise_.
|
private |
Definition at line 143 of file future_extensions.h.
Referenced by kcenon::thread::pool_promise< T >::get_future(), kcenon::thread::pool_promise< void >::get_future(), kcenon::thread::pool_promise< T >::set_exception(), kcenon::thread::pool_promise< void >::set_exception(), kcenon::thread::pool_promise< T >::set_exception_at_thread_exit(), kcenon::thread::pool_promise< void >::set_exception_at_thread_exit(), kcenon::thread::pool_promise< T >::set_value(), kcenon::thread::pool_promise< T >::set_value(), kcenon::thread::pool_promise< void >::set_value(), kcenon::thread::pool_promise< T >::set_value_at_thread_exit(), and kcenon::thread::pool_promise< void >::set_value_at_thread_exit().