Namespaces
Variants

std::atomic_flag:: test

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
bool test ( std:: memory_order order =
std:: memory_order_seq_cst ) const volatile noexcept ;
(1) (C++20 이후)
bool test ( std:: memory_order order =
std:: memory_order_seq_cst ) const noexcept ;
(2) (C++20 이후)

* this 의 값을 원자적으로 읽고 해당 값을 반환합니다.

만약 order std:: memory_order_release std:: memory_order_acq_rel 중 하나라면, 동작은 정의되지 않습니다.

목차

매개변수

order - 메모리 동기화 순서

반환값

원자적으로 읽은 값.

예제

참고 항목

플래그의 값을 원자적으로 반환합니다
(함수)