std::atomic_ref<T>::is_lock_free (3) - Linux Manuals
std::atomic_ref<T>::is_lock_free: std::atomic_ref<T>::is_lock_free
Command to display std::atomic_ref<T>::is_lock_free
manual in Linux: $ man 3 std::atomic_ref<T>::is_lock_free
NAME
std::atomic_ref<T>::is_lock_free - std::atomic_ref<T>::is_lock_free
Synopsis
bool is_lock_free() const noexcept; (since C++20)
Checks whether the atomic operations on this object are lock-free.
Parameters
(none)
Return value
true if the atomic operations on this object are lock-free, false otherwise.
Notes
All atomic types except for std::atomic_flag may be implemented using mutexes or other locking operations, rather than using the lock-free atomic CPU instructions. Atomic types are also allowed to be sometimes lock-free, e.g. if only aligned memory accesses are naturally atomic on a given architecture, misaligned objects of the same type have to use locks.
The C++ standard recommends (but does not require) that lock-free atomic operations are also address-free, that is, suitable for communication between processes using shared memory.
Example
This section is incomplete
Reason: no example
See also
is_always_lock_free indicates that the type is always lock-free
(public static member constant)
[static]
Pages related to std::atomic_ref<T>::is_lock_free
- std::atomic_ref<T>::is_always_lock_free (3) - std::atomic_ref<T>::is_always_lock_free
- std::atomic_ref<T>::atomic_ref (3) - std::atomic_ref<T>::atomic_ref
- std::atomic_ref<T>::compare_exchange_weak,std::atomic_ref<T>::compare_exchange_strong (3) - std::atomic_ref<T>::compare_exchange_weak,std::atomic_ref<T>::compare_exchange_strong
- std::atomic_ref<T>::exchange (3) - std::atomic_ref<T>::exchange
- std::atomic_ref<T>::fetch_add (3) - std::atomic_ref<T>::fetch_add
- std::atomic_ref<T>::fetch_and (3) - std::atomic_ref<T>::fetch_and
- std::atomic_ref<T>::fetch_or (3) - std::atomic_ref<T>::fetch_or
- std::atomic_ref<T>::fetch_sub (3) - std::atomic_ref<T>::fetch_sub
- std::atomic_ref<T>::fetch_xor (3) - std::atomic_ref<T>::fetch_xor
- std::atomic_ref<T>::load (3) - std::atomic_ref<T>::load
- std::atomic_ref<T>::operator++,++(int),--,--(int) (3) - std::atomic_ref<T>::operator++,++(int),--,--(int)
- std::atomic_ref<T>::operator+=,-=,&=,|=,^= (3) - std::atomic_ref<T>::operator+=,-=,&=,|=,^=
- std::atomic_ref<T>::operator= (3) - std::atomic_ref<T>::operator=
- std::atomic_ref<T>::operatorT (3) - std::atomic_ref<T>::operatorT
- std::atomic_ref<T>::required_alignment (3) - std::atomic_ref<T>::required_alignment
- std::atomic_ref<T>::store (3) - std::atomic_ref<T>::store
- std::atomic_ref (3) - std::atomic_ref
- std::atomic_...<std::shared_ptr> (3) - std::atomic_...<std::shared_ptr>