CountDownLatch 构造函数

定义

重载

名称 说明
CountDownLatch(Int32)

CountDownLatch构造使用给定计数进行初始化。

CountDownLatch(IntPtr, JniHandleOwnership)

创建 JNI 对象的托管表示形式时使用的构造函数;由运行时调用。

CountDownLatch(Int32)

CountDownLatch构造使用给定计数进行初始化。

[Android.Runtime.Register(".ctor", "(I)V", "")]
public CountDownLatch(int count);
[<Android.Runtime.Register(".ctor", "(I)V", "")>]
new Java.Util.Concurrent.CountDownLatch : int -> Java.Util.Concurrent.CountDownLatch

参数

count
Int32

必须先调用次数 #countDown ,然后线程才能通过 #await

属性

例外

如果 count 为负数

注解

CountDownLatch构造使用给定计数进行初始化。

Java文档java.util.concurrent.CountDownLatch.CountDownLatch(int)

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

适用于

CountDownLatch(IntPtr, JniHandleOwnership)

创建 JNI 对象的托管表示形式时使用的构造函数;由运行时调用。

protected CountDownLatch(IntPtr javaReference, Android.Runtime.JniHandleOwnership transfer);
new Java.Util.Concurrent.CountDownLatch : nativeint * Android.Runtime.JniHandleOwnership -> Java.Util.Concurrent.CountDownLatch

参数

javaReference
IntPtr

nativeint

IntPtr一个包含Java本机接口 (JNI) 对象引用。

transfer
JniHandleOwnership

指示 JniHandleOwnership如何处理 javaReference

注解

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

适用于