|
template<typename ... Args> |
| requires (std::constructible_from< value_store_type, Args ... > &&avoid_same_kind< future, Args... >) future(Args &&... args) |
| Construct future already resolved with a value. More...
|
|
template<typename ... Args> |
| future (std::in_place_t, Args &&... args) |
| Construct future already resolved with a value. More...
|
|
template<std::invocable< promise_t > Fn> |
| future (Fn &&fn) |
| Construct future which is evaluated inside of lambda function. More...
|
|
template<std::invocable< promise_t > Fn> |
| future (deferred_tag, Fn &&fn) |
| Construct future with deferred evaluation. More...
|
|
| ~future () |
| dtor More...
|
|
template<invocable_r_exact< future > Fn> |
future & | operator<< (Fn &&fn) |
| Store result future in already declared value. More...
|
|
promise_t | get_promise () |
| Retrieve promise and begin evaluation. More...
|
|
prepared_coro | start () |
| Start deferred execution. More...
|
|
template<std::invocable<> Fn> |
bool | set_callback (Fn &&fn) |
| Sets callback which is called once future is resolved (in future) More...
|
|
bool | unset_callback () |
| unset callback More...
|
|
template<std::invocable<> Fn> |
bool | then (Fn &&fn) |
| Sets function which is called once future is resolved (always) More...
|
|
template<std::invocable<> Fn> |
bool | operator>> (Fn &&fn) |
| Sets function which is called once future is resolved (always) More...
|
|
wait_awaiter | wait () noexcept |
| Perform synchronous wait on resolution. More...
|
|
ret_value | get () |
| Retrieves value, performs synchronous wait. More...
|
|
| operator cast_ret_value () |
| Retrieves value, performs synchronous wait. More...
|
|
bool | is_pending () const |
| Determines pending status. More...
|
|
bool | is_in_progress () const |
| Determine in progress status. More...
|
|
bool | is_deferred () const |
| Determine deferred status. More...
|
|
bool | is_awaited () const |
| Determine whether an awaiter is set. More...
|
|
bool | await_ready () const noexcept |
| co_await support, returns true, if value is ready (resolved) More...
|
|
std::coroutine_handle | await_suspend (std::coroutine_handle<> h) noexcept |
| co_await support, called with suspended coroutine More...
|
|
bool | has_value () const |
| Determines, whether future has a value. More...
|
|
bool | has_exception () const |
| Determines, whether future has exception. More...
|
|
canceled_awaiter | operator! () |
| awaitable for canceled operation More...
|
|
template<typename X > |
promise< X >::notify | forward_to (promise< X > &prom) &noexcept |
| Forward value, possibly convert it, to different promise. More...
|
|
template<typename X > |
promise< X >::notify | forward_to (promise< X > &prom) &&noexcept |
| Forward value, possibly convert it, to different promise. More...
|
|
template<typename X , std::invocable< cast_ret_value > Fn> |
promise< X >::notify | convert_to (promise< X > &prom, Fn &&convert) noexcept |
| Forward value, possibly convert it, to different promise. More...
|
|
template<typename T>
class coro::future< T >
Contains future value of T, can be co_awaited in coroutine.
- Template Parameters
-
T | type which is subject of the future. T can be void. T can be also a reference , |
Definition at line 417 of file future.h.