Namespaces
Variants

std::future<T>:: ~future

From cppreference.net
Concurrency support library
Threads
(C++11)
(C++20)
this_thread namespace
(C++11)
(C++11)
Cooperative cancellation
Mutual exclusion
Generic lock management
Condition variables
(C++11)
Semaphores
Latches and Barriers
(C++20)
(C++20)
Futures
(C++11)
(C++11)
(C++11)
Safe reclamation
Hazard pointers
Atomic types
(C++11)
(C++20)
Initialization of atomic types
(C++11) (deprecated in C++20)
(C++11) (deprecated in C++20)
Memory ordering
(C++11) (deprecated in C++26)
Free functions for atomic operations
Free functions for atomic flags
~future ( ) ;
(C++11부터)

공유 상태를 해제합니다. 이는 다음을 의미합니다:

  • 현재 객체가 공유 상태에 대한 마지막 참조를 보유하고 있는 경우, 공유 상태는 소멸됩니다.
  • 현재 객체는 공유 상태에 대한 참조를 포기합니다.
  • 다음 조건들을 모두 만족하는 경우를 제외하면, 이 동작들은 공유 상태가 준비될 때까지 블록하지 않습니다:
    • 공유 상태가 std::async 호출로 생성된 경우
    • 공유 상태가 아직 준비되지 않은 경우
    • 현재 객체가 공유 상태에 대한 마지막 참조인 경우
(C++14부터)