語言

AtomicLong.WeakCompareAndSetPlain(Int64, Int64) 方法

定義

可能原子上將值設定為 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 所創建與分享的作品,並依授權條款所描述的使用進行修改。

適用於