std::shared_future<T>:: shared_future
From cppreference.net
<
cpp
|
thread
|
shared future
C++
Concurrency support library
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
std::shared_future
| Member functions | ||||
|
shared_future::shared_future
|
||||
| Getting the result | ||||
| State | ||||
|
shared_future
(
)
noexcept
;
|
(1) | (C++11부터) |
| (2) | ||
|
shared_future
(
const
shared_future
&
other
)
;
|
(C++11부터)
(C++17까지) |
|
|
shared_future
(
const
shared_future
&
other
)
noexcept
;
|
(C++17부터) | |
|
shared_future
(
std::
future
<
T
>
&&
other
)
noexcept
;
|
(3) | (C++11부터) |
|
shared_future
(
shared_future
&&
other
)
noexcept
;
|
(4) | (C++11부터) |
새로운
shared_future
를 생성합니다.
1)
기본 생성자. 빈 shared future를 생성하며, 공유 상태를 참조하지 않습니다. 즉
valid
(
)
==
false
입니다.
2)
동일한 공유 상태(있는 경우)를 참조하는 shared future를 생성합니다. 이는
other
와 동일한 상태를 참조합니다.
3,4)
other
가 보유한 공유 상태를
*
this
로 이전합니다. 생성 후에는
other.
valid
(
)
==
false
이며,
this
-
>
valid
(
)
는 생성 전
other.
valid
(
)
가 반환했던 값과 동일한 값을 반환합니다.
매개변수
| other | - | 초기화할 다른 future 객체 |