AtomicIntegerArray.CompareAndSet(Int32, Int32, Int32) メソッド

定義

によって指定されたメモリ効果を使用してnewValue、要素の現在の値== expectedValueが の場合、インデックスi位置の 要素を にアトミックにVarHandle#compareAndSet設定します。

[Android.Runtime.Register("compareAndSet", "(III)Z", "")]
public bool CompareAndSet (int i, int expectedValue, int newValue);
[<Android.Runtime.Register("compareAndSet", "(III)Z", "")>]
member this.CompareAndSet : int * int * int -> bool

パラメーター

i
Int32

インデックス

expectedValue
Int32

予期される値

newValue
Int32

新しい値

戻り値

正常終了した場合は、true。 False の戻り値は、実際の値が期待値と等しくないことを示します。

属性

注釈

によって指定されたメモリ効果を使用してnewValue、要素の現在の値== expectedValueが の場合、インデックスi位置の 要素を にアトミックにVarHandle#compareAndSet設定します。

java.util.concurrent.atomic.AtomicIntegerArray.compareAndSet(int, int, int)Java ドキュメント。

このページの一部は、によって作成および共有された作業に基づく変更であり、に記載されている条件に従って使用されます。

適用対象