|
| Future () noexcept=default |
| Constructs future without (a reference to) a shared state. More...
|
|
| Future (const Future &other) noexcept |
| Constructs a future with a reference to the shared state of other.
|
|
| Future (Future &&other) noexcept |
| Moves the shared state of other to *this . More...
|
|
Future & | operator= (const Future &other) noexcept |
| Abandons the shared state of *this as if by ~Future(), then creates a reference to the shared state of other. More...
|
|
Future & | operator= (Future &&other) noexcept |
| Abandons the shared state of *this as if by ~Future(), then moves the shared state of other to *this . More...
|
|
| ~Future () |
| Abandons the shared state. More...
|
|
| operator bool () const noexcept |
| Checks whether *this contains (a reference to) a shared state.
|
|
bool | is_unique () const noexcept |
| Checks whether *this contains a unique reference to its shared state. More...
|
|
bool | is_ready () const noexcept |
| Checks whether the future is ready, i.e., its associated promise has been satisfied and a result has been stored in the shared state. More...
|
|
result_type & | get () |
| Returns the result of a ready future. More...
|
|
const result_type & | get () const |
| Returns the result of a ready future. More...
|
|
void | submit (ev_task &task) noexcept |
|
template<class F > |
void | submit (ev_exec_t *exec, F &&f) |
|
bool | cancel (ev_task &task) noexcept |
|
::std::size_t | cancel_all () noexcept |
|
bool | abort (ev_task &task) noexcept |
|
::std::size_t | abort_all () noexcept |
|
template<class F > |
AsyncTask< F, Future >::future_type | then (ev_exec_t *exec, F &&f) |
| Attaches a continuation function to a future and returns a new future which becomes ready once the continuation completes. More...
|
|
template<class T, class E>
class lely::ev::Future< T, E >
A future.
- See also
- ev_future_t
Definition at line 50 of file future.hpp.
template<class T , class E >
template<class F >
Attaches a continuation function to a future and returns a new future which becomes ready once the continuation completes.
The continuation receives a single parameter: *this
. The result of the continuation (or any exception thrown during invocation) is stored in the future, unless the continuation returns a future. In that case, the result of that future (as obtained by get().value()
) is used instead. This is known as implicit unwrapping.
Definition at line 558 of file future.hpp.