语言

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文档java.util.concurrent.CountedCompleter.compareAndSetPendingCount(int, int)。

本页的某些部分是根据 创建和共享的工作进行的修改,并根据 许可证中所述的条款使用。

适用于