다음을 통해 공유


future::get 메서드

Retrieves the result that is stored in the associated asynchronous state.

Ty get();

반환 값

If the result is an exception, the method rethrows it. Otherwise, the result is returned.

설명

Before it retrieves the result, this method blocks the current thread until the associated asynchronous state is ready.

For the partial specialization future<Ty&>, the stored value is effectively a reference to the object that was passed to the asynchronous provider as the return value.

Because no stored value exists for the specialization future<void>, the method returns void.

In other specializations, the method moves its return value from the stored value. Therefore, call this method only once.

요구 사항

헤더: future

네임스페이스: std

참고 항목

참조

future 클래스

<future>