|
LMMS
|
#include <juce_Atomic.h>
Public Types | |
| using | DiffType = typename AtomicHelpers::DiffTypeHelper<Type>::Type |
Public Member Functions | |
| Atomic () noexcept | |
| Atomic (Type initialValue) noexcept | |
| Atomic (const Atomic &other) noexcept | |
| ~Atomic () noexcept | |
| Type | get () const noexcept |
| void | set (Type newValue) noexcept |
| Type | exchange (Type newValue) noexcept |
| bool | compareAndSetBool (Type newValue, Type valueToCompare) noexcept |
| Atomic< Type > & | operator= (const Atomic &other) noexcept |
| Atomic< Type > & | operator= (Type newValue) noexcept |
| Type | operator+= (DiffType amountToAdd) noexcept |
| Type | operator-= (DiffType amountToSubtract) noexcept |
| Type | operator++ () noexcept |
| Type | operator-- () noexcept |
| void | memoryBarrier () noexcept |
| Type | compareAndSetValue (Type, Type) noexcept |
Public Attributes | |
| std::atomic< Type > | value |
A simple wrapper around std::atomic.
@tags{Core}
| using juce::Atomic< Type >::DiffType = typename AtomicHelpers::DiffTypeHelper<Type>::Type |
|
inlinenoexcept |
Creates a new value, initialised to zero.
|
inlinenoexcept |
Creates a new value, with a given initial value.
|
inlinenoexcept |
Copies another value (atomically).
|
inlinenoexcept |
Destructor.
|
inlinenoexcept |
Atomically compares this value with a target value, and if it is equal, sets this to be equal to a new value.
This operation is the atomic equivalent of doing this:
Internally, this method calls std::atomic::compare_exchange_strong with memory_order_seq_cst (the strictest std::memory_order).
|
noexcept |
|
inlinenoexcept |
Atomically sets the current value, returning the value that was replaced.
|
inlinenoexcept |
Atomically reads and returns the current value.
|
inlinenoexcept |
Implements a memory read/write barrier.
Internally this calls std::atomic_thread_fence with memory_order_seq_cst (the strictest std::memory_order).
|
inlinenoexcept |
Atomically increments this value, returning the new value.
|
inlinenoexcept |
Atomically adds a number to this value, returning the new value.
|
inlinenoexcept |
Atomically decrements this value, returning the new value.
|
inlinenoexcept |
Atomically subtracts a number from this value, returning the new value.
|
inlinenoexcept |
Copies another value into this one (atomically).
|
inlinenoexcept |
Copies another value into this one (atomically).
|
inlinenoexcept |
Atomically sets the current value.
| std::atomic<Type> juce::Atomic< Type >::value |
The std::atomic object that this class operates on.