AtomicArray<T> class
An Array in which elements are always updated atomically.
For additional details about atomicity guarantees for reads and writes see Volatile.
- Annotations
Constructors
Properties
Methods
-
compareAndExchange(
Int index, T expectedValue, T newValue) → T -
Atomically sets the value of the element at the given
indexto thenewValueif the current value equals theexpectedValueand returns the old value of the element in any case. -
compareAndSet(
Int index, T expectedValue, T newValue) → Boolean -
Atomically sets the value of the element at the given
indexto thenewValueif the current value equals theexpectedValue. -
getAndSet(
Int index, T newValue) → T -
Atomically sets the value of the element at the given
indexto thenewValueand returns the old value of the element. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
Returns the string representation of the underlying IntArray.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
-
operator [](
Int index) → dynamic -
Atomically gets the value of the element at the given
index. -
operator []=(
Int index, T newValue) → void -
Atomically sets the value of the element at the given
indexto thenewValue.