語言

CountedCompleter.CompareAndSetPendingCount(Int32, Int32) 方法

定義

僅當待計數目前保持給定期望值時,才能(原子層次)將待計數設定為給定計數。

[Android.Runtime.Register("compareAndSetPendingCount", "(II)Z", "", ApiSince=24)]
public bool CompareAndSetPendingCount(int expected, int count);
[<Android.Runtime.Register("compareAndSetPendingCount", "(II)Z", "", ApiSince=24)>]
member this.CompareAndSetPendingCount : int * int -> bool

參數

expected
Int32

期望值

count
Int32

新值

傳回

true 若成功

屬性

備註

僅當待計數目前保持給定期望值時,才能(原子層次)將待計數設定為給定計數。

的 java.util.concurrent.CountedCompleter.compareAndSetPendingCount(int, int)Java 檔。

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

適用於