std::experimental:: promise (library fundamentals TS)
From cppreference.net
<
cpp
|
experimental
|
lib extensions
이 페이지는 Library Fundamentals TS에서 제공하는 타입 삭제된 할당자 지원을 갖춘 수정된 버전의
std::promise
에 관한 것입니다. 동시성 TS에서 제공하는
promise
버전(해당 TS에서 개선된
std::future
를 지원하는)에 대해서는
std::experimental::concurrency_v1::promise
를 참조하십시오.
|
헤더 파일에 정의됨
<experimental/future>
|
||
|
template
<
class
R
>
class
promise
;
|
(1) | (라이브러리 fundamentals TS) |
|
template
<
class
R
>
class
promise
<
R
&
>
;
|
(2) | (라이브러리 fundamentals TS) |
|
template
<>
class
promise
<
void
>
;
|
(3) | (라이브러리 fundamentals TS) |
std::experimental::fundamentals_v1::promise
(및
std::experimental::fundamentals_v2::promise
)는 라이브러리 fundamentals TS에서 제공하는
std::promise
의 수정된 버전으로, 타입 삭제 할당자(type-erased allocators)를 지원합니다.
목차 |
멤버 타입
| 멤버 타입 | 정의 |
allocator_type
|
std::experimental::erased_type |
멤버 함수
|
promise 객체를 생성합니다
(public member function) |
|
|
이 객체가 메모리 할당에 사용하는 메모리 리소스에 대한 포인터를 반환합니다
(public member function) |
비멤버 함수
swap
알고리즘을 특수화함
(함수 템플릿) |
헬퍼 클래스
|
std::uses_allocator
타입 특성의 특수화
(클래스 템플릿 특수화) |
std::promise와 동일한 멤버
멤버 함수
|
promise 객체를 파괴함
(
std::promise<R>
의 public 멤버 함수)
|
|
|
공유 상태를 할당함
(
std::promise<R>
의 public 멤버 함수)
|
|
|
두 promise 객체를 교환함
(
std::promise<R>
의 public 멤버 함수)
|
|
결과 얻기 |
|
|
약속된 결과와 연관된
future
를 반환함
(
std::promise<R>
의 public 멤버 함수)
|
|
결과 설정 |
|
|
결과를 특정 값으로 설정함
(
std::promise<R>
의 public 멤버 함수)
|
|
|
결과를 특정 값으로 설정하면서 스레드 종료 시에만 알림을 전달함
(
std::promise<R>
의 public 멤버 함수)
|
|
|
결과를 예외를 나타내도록 설정함
(
std::promise<R>
의 public 멤버 함수)
|
|
|
결과를 예외를 나타내도록 설정하면서 스레드 종료 시에만 알림을 전달함
(
std::promise<R>
의 public 멤버 함수)
|
|