AtomicLongArray.CompareAndSet(Int32, Int64, Int64) メソッド

定義

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

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

パラメーター

i
Int32

インデックス

expectedValue
Int64

予期される値

newValue
Int64

新しい値

戻り値

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

属性

注釈

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

の Java ドキュメント java.util.concurrent.atomic.AtomicLongArray.compareAndSet(int, long, long)

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

適用対象