AtomicIntegerArray.GetAndAdd(Int32, Int32) Method

Definition

Atomically adds the given value to the element at index i, with memory effects as specified by VarHandle#getAndAdd.

[Android.Runtime.Register("getAndAdd", "(II)I", "")]
public int GetAndAdd (int i, int delta);
[<Android.Runtime.Register("getAndAdd", "(II)I", "")>]
member this.GetAndAdd : int * int -> int

Parameters

i
Int32

the index

delta
Int32

the value to add

Returns

the previous value

Attributes

Remarks

Atomically adds the given value to the element at index i, with memory effects as specified by VarHandle#getAndAdd.

Java documentation for java.util.concurrent.atomic.AtomicIntegerArray.getAndAdd(int, int).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to