std::shared_future<T>::wait (3) - Linux Man Pages
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.
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.
Calling wait on the same std::shared_future from multiple threads is not safe; the intended use is for each thread that waits on the same shared state to have a copy of a std::shared_future.
// Run this code
wait_for (public member function)
wait_until (public member function)