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

Public Types | |
| using | value_type = T |
Public Member Functions | |
| pool_future (std::future< T > &&future) | |
| Construct from a std::future. | |
| bool | is_ready () const |
| Check if the future is ready. | |
| T | get () |
| Wait for the result. | |
| template<typename Rep , typename Period > | |
| std::future_status | wait_for (const std::chrono::duration< Rep, Period > &timeout) |
| Wait for the result with timeout. | |
| void | wait () |
| Wait until the result is available. | |
| bool | valid () const |
| Check if the future is valid. | |
| template<typename F > | |
| auto | then (F &&continuation) -> pool_future< std::invoke_result_t< F, T > > |
| Chain another operation after this future completes. | |
Private Attributes | |
| std::future< T > | future_ |
A future that can be scheduled on a thread pool.
This class extends std::future with thread pool integration and provides additional utilities for async operations.
Definition at line 31 of file future_extensions.h.
| using kcenon::thread::pool_future< T >::value_type = T |
Definition at line 33 of file future_extensions.h.
|
inlineexplicit |
Construct from a std::future.
Definition at line 38 of file future_extensions.h.
|
inline |
Wait for the result.
Definition at line 51 of file future_extensions.h.
References kcenon::thread::pool_future< T >::future_.
|
inline |
Check if the future is ready.
Definition at line 44 of file future_extensions.h.
References kcenon::thread::pool_future< T >::future_.
| auto kcenon::thread::pool_future< T >::then | ( | F && | continuation | ) | -> pool_future< std::invoke_result_t< F, T > > |
Chain another operation after this future completes.
|
inline |
Check if the future is valid.
Definition at line 73 of file future_extensions.h.
References kcenon::thread::pool_future< T >::future_.
|
inline |
Wait until the result is available.
Definition at line 66 of file future_extensions.h.
References kcenon::thread::pool_future< T >::future_.
|
inline |
Wait for the result with timeout.
Definition at line 59 of file future_extensions.h.
References kcenon::thread::pool_future< T >::future_.
|
private |