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