共用方式為


AtomicLong.WeakCompareAndSetRelease(Int64, Int64) 方法

定義

如果目前的值為 ,可能會不可部分完成地將 值== expectedValue設定為 newValue ,且記憶體效果如 所VarHandle#weakCompareAndSetRelease指定。

[Android.Runtime.Register("weakCompareAndSetRelease", "(JJ)Z", "", ApiSince=33)]
public bool WeakCompareAndSetRelease (long expectedValue, long newValue);
[<Android.Runtime.Register("weakCompareAndSetRelease", "(JJ)Z", "", ApiSince=33)>]
member this.WeakCompareAndSetRelease : int64 * int64 -> bool

參數

expectedValue
Int64

預期的值

newValue
Int64

新值

傳回

true 如果成功,則為

屬性

備註

如果目前的值為 ,可能會不可部分完成地將 值== expectedValue設定為 newValue ,且記憶體效果如 所VarHandle#weakCompareAndSetRelease指定。

已在 9 中新增。

java.util.concurrent.atomic.AtomicLong.weakCompareAndSetRelease(long, long)Java 檔。

此頁面的部分是根據 Android 開放原始碼專案所建立和共用的工作進行修改,並根據 Creative Commons 2.5 屬性授權中所述的詞彙使用。

適用於