shared_future::wait_for 메서드
Blocks the current thread until the associated asynchronous state is ready or until a specified time has elapsed.
template<class Rep, class Period>
future_status wait_for(
const chrono::duration<Rep, Period>& Rel_time) const;
매개 변수
- Rel_time
A chrono::duration object that specifies a maximum time interval that the thread blocks.
반환 값
반환 이유를 나타내는 future_status입니다.
설명
연결된 비동기 상태는 해당 비동기 공급자가 반환 값을 저장했거나 예외를 저장한 경우에만 준비입니다.
요구 사항
헤더: future
네임스페이스: std