std::promise<R>:: promise
From cppreference.net
C++
Concurrency support library
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
std::promise
| Member functions | ||||
|
promise::promise
|
||||
| Getting the result | ||||
| Setting the result | ||||
| Non-member Functions | ||||
| Helper Classes | ||||
|
promise
(
)
;
|
(1) | (C++11 이후) |
|
template
<
class
Alloc
>
promise ( std:: allocator_arg_t , const Alloc & alloc ) ; |
(2) | (C++11 이후) |
|
promise
(
promise
&&
other
)
noexcept
;
|
(3) | (C++11 이후) |
|
promise
(
const
promise
&
other
)
=
delete
;
|
(4) | (C++11 이후) |
promise
객체를 생성합니다.
1)
기본 생성자. 빈 공유 상태로 promise를 생성합니다.
3)
이동 생성자.
other
의 공유 상태를 이동 의미론을 사용하여 생성합니다. 생성 후,
other
는 공유 상태를 갖지 않습니다.
4)
promise
는 복사할 수 없습니다.
매개변수
| alloc | - | 공유 상태를 할당하는 데 사용할 할당자 |
| other | - |
상태를 획득할 다른
promise
|
예외
1,2)
구현 시 정의된 예외를 발생시킬 수 있습니다.
예제
|
이 섹션은 불완전합니다
이유: 예제가 없음 |