CountedCompleter.CompareAndSetPendingCount(Int32, Int32) 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
仅当挂起的计数当前保留给定的预期值时,才会将挂起的计数设置为给定计数。
[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)。
本页的某些部分是根据 创建和共享的工作进行的修改,并根据 许可证中所述的条款使用。