A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://en.cppreference.com/w/cpp/language/../error/error_code/../../../cpp/thread/future/wait.html below:

std::future<T>::wait - cppreference.com

void wait() const;

(since C++11)

Blocks until the result becomes available. valid() == true after the call.

The behavior is undefined if valid() == false before the call to this function.

[edit] Parameters

(none)

[edit] Return value

(none)

[edit] Exceptions

May throw implementation-defined exceptions.

[edit] Notes

The implementations are encouraged to detect the case when valid() == false before the call and throw a std::future_error with an error condition of std::future_errc::no_state.

[edit] Example

Possible output:

waiting... 1.61803 seconds
f1: 102334155
f2: 433494437
[edit] See also waits for the result, returns if it is not available for the specified timeout duration
(public member function) [edit] waits for the result, returns if it is not available until specified time point has been reached
(public member function) [edit]

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4