AtomicIntegerArray.WeakCompareAndSetAcquire(Int32, Int32, Int32) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
若元素的當前值== expectedValue為 ,則可能原子性地將該元素i的索引設為 ,newValue並有記憶體效應,由 所指定VarHandle#weakCompareAndSetAcquire。
[Android.Runtime.Register("weakCompareAndSetAcquire", "(III)Z", "", ApiSince=33)]
public bool WeakCompareAndSetAcquire(int i, int expectedValue, int newValue);
[<Android.Runtime.Register("weakCompareAndSetAcquire", "(III)Z", "", ApiSince=33)>]
member this.WeakCompareAndSetAcquire : int * int * int -> bool
參數
- i
- Int32
指數
- expectedValue
- Int32
期望值
- newValue
- Int32
新值
傳回
true 若成功
- 屬性
備註
若元素的當前值== expectedValue為 ,則可能原子性地將該元素i的索引設為 ,newValue並有記憶體效應,由 所指定VarHandle#weakCompareAndSetAcquire。
新增9。
的 java.util.concurrent.atomic.AtomicIntegerArray.weakCompareAndSetAcquire(int, int, int)Java 檔。
本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。