td::jthread ](/w/cpp/thread/jthread "cpp/thread/jthread") s   
(class)  [ [edit]
](https://en.cppreference.com/mwiki/index.php?title=Template:cpp/thread/dsc_stop_source&action=edit)  
[ stop_callback  ](/w/cpp/thread/stop_callback "cpp/thread/stop callback") (C++20)  |  an interface for registering callbacks on  [ std::jthread ](/w/cpp/thread/jthread "cpp/thread/jthread") cancellation   
(class template)  [ [edit]
](https://en.cppreference.com/mwiki/index.php?title=Template:cpp/thread/dsc_stop_callback&action=edit)  
(since C++20)  
  
###  [ [ edit ](/mwiki/index.php?title=cpp/thread&action=edit&section=3 "Edit
section: Cache size access") ]  Cache size access

Defined in header ` [ <new> ](/w/cpp/header/new "cpp/header/new") `  
---  
[ hardware_destructive_interference_size  hardware_constructive_interference_size  ](/w/cpp/thread/hardware_destructive_interference_size "cpp/thread/hardware destructive interference size") (C++17)  |  min offset to avoid false sharing   
max offset to promote true sharing  
(constant)  [ [edit]
](https://en.cppreference.com/mwiki/index.php?title=Template:cpp/thread/dsc_hardware_destructive_interference_size&action=edit)  
  
###  [ [ edit ](/mwiki/index.php?title=cpp/thread&action=edit&section=4 "Edit
section: Atomic operations") ]  Atomic operations

These components are provided for fine-grained atomic operations allowing for
lockless concurrent programming. Each atomic operation is indivisible with
regards to any other atomic operation that involves the same object. Atomic
objects are [ free of data races
](/w/cpp/language/memory_model#Threads_and_data_races "cpp/language/memory
model") .

Neither the ` _Atomic ` macro, nor any of the non-macro global namespace declarations are provided by any C++ standard library header other than ` <stdatomic.h> ` .  |  (since C++23)   
---|---  
Defined in header ` [ <atomic> ](/w/cpp/header/atomic "cpp/header/atomic") `  
---  
  
#####  Atomic types  
  
[ atomic  ](/w/cpp/atomic/atomic "cpp/atomic/atomic") (C++11)  |  atomic class template and specializations for bool, integral,  floating-point,  (since C++20)  and pointer types   
(class template)  [ [edit]
](https://en.cppreference.com/mwiki/index.php?title=Template:cpp/atomic/dsc_atomic&action=edit)  
[ atomic_ref  ](/w/cpp/atomic/atomic_ref "cpp/atomic/atomic ref") (C++20)  |  provides atomic operations on non-atomic objects   
(class template)  [ [edit]
](https://en.cppreference.com/mwiki/index.php?title=Template:cpp/atomic/dsc_atomic_ref&action=edit)  
  
#####  Operations on atomic types  
  
[ atomic_is_lock_free  ](/w/cpp/atomic/atomic_is_lock_free "cpp/atomic/atomic is lock free") (C++11)  |  checks if the atomic type's operations are lock-free   
(function template)  [ [edit]
](https://en.cppreference.com/mwiki/index.php?title=Template:cpp/atomic/dsc_atomic_is_lock_free&action=edit)  
[ atomic_store  atomic_store_explicit  ](/w/cpp/atomic/atomic_store "cpp/atomic/atomic store") (C++11)  (C++11)  |  atomically replaces the value of the atomic object with a non-atomic argument   
(function template)  [ [edit]
](https://en.cppreference.com/mwiki/index.php?title=Template:cpp/atomic/dsc_atomic_store&action=edit)  
[ atomic_load  atomic_load_explicit  ](/w/cpp/atomic/atomic_load "cpp/atomic/atomic load") (C++11)  (C++11)  |  atomically obtains the value stored in an atomic object   
(function template)  [ [edit]
](https://en.cppreference.com/mwiki/index.php?title=Template:cpp/atomic/dsc_atomic_load&action=edit)  
[ atomic_exchange  atomic_exchange_explicit  ](/w/cpp/atomic/atomic_exchange "cpp/atomic/atomic exchange") (C++11)  (C++11)  |  atomically replaces the value of the atomic object with non-atomic argument and returns the old value of the atomic   
(function template)  [ [edit]
](https://en.cppreference.com/mwiki/index.php?title=Template:cpp/atomic/dsc_atomic_exchange&action=edit)  
[ atomic_compare_exchange_weak  atomic_compare_exchange_weak_explicit  atomic_compare_exchange_strong  atom