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