AtomicInteger.CompareAndExchangeRelease(Int32, Int32) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
以不可部分完成的方式,將值設定為 ,如果目前的值稱為 em 見證值</em>,== expectedValue且記憶體效果如 所VarHandle#compareAndExchangeRelease指定。><newValue
[Android.Runtime.Register("compareAndExchangeRelease", "(II)I", "", ApiSince=33)]
public int CompareAndExchangeRelease(int expectedValue, int newValue);
[<Android.Runtime.Register("compareAndExchangeRelease", "(II)I", "", ApiSince=33)>]
member this.CompareAndExchangeRelease : int * int -> int
參數
- expectedValue
- Int32
預期的值
- newValue
- Int32
新值
傳回
見證值,如果成功,將會與預期的值相同
- 屬性
備註
以不可部分完成的方式,將值設定為 ,如果目前的值稱為 em 見證值</em>,== expectedValue且記憶體效果如 所VarHandle#compareAndExchangeRelease指定。><newValue
已在 9 中新增。
的 java.util.concurrent.atomic.AtomicInteger.compareAndExchangeRelease(int, int)Java 檔。
此頁面的部分是根據 Android 開放原始碼專案所建立和共用的工作進行修改,並根據 Creative Commons 2.5 屬性授權中所述的詞彙使用。