std::shared_future::get
From cppreference.com
< cpp | thread | shared future
T get(); |
(1) | (member only of generic shared_future template) (since C++11) |
T& get(); |
(2) | (member only of shared_future<T&> template specialization) (since C++11) |
void get(); |
(3) | (member only of shared_future<void> template specialization) (since C++11) |
Waits until the result is ready in the shared state, then retrieves it. Effectively calls wait() in order to wait for the result.
Each of the three versions of the functions are available only in the generic template and two template specializations respectively. They differ only in the return type.
valid() == false after a call to this function.
Contents |
[edit] Parameters
(none)
[edit] Return value
1) The value stored in the shared state. If it satisfies the requirements of MoveAssignable, the value is moved, otherwise it is copied.
2) Reference to the value in the shared state.
3) Nothing.
[edit] Exceptions
The stored exception, if any.This section is incomplete Reason: explain better |
[edit] Example
This section is incomplete Reason: no example |
[edit] See also
checks if the result is available (public member function) |