다음을 통해 공유


shared_future::get 메서드

Retrieves the result that's stored in the associated asynchronous state.

const Ty& get() const;
Ty& get() const;
void get() const;

설명

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 shared_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 shared_future<void>, the method returns void.

요구 사항

헤더: future

네임스페이스: std

참고 항목

참조

shared_future 클래스

<future>