ThreadPoolExecutor.CorePoolSize 属性

定义

返回线程的核心数。 - 或 - 设置线程的核心数。

public virtual int CorePoolSize { [Android.Runtime.Register("getCorePoolSize", "()I", "GetGetCorePoolSizeHandler")] get; [Android.Runtime.Register("setCorePoolSize", "(I)V", "GetSetCorePoolSize_IHandler")] set; }
[<get: Android.Runtime.Register("getCorePoolSize", "()I", "GetGetCorePoolSizeHandler")>]
[<set: Android.Runtime.Register("setCorePoolSize", "(I)V", "GetSetCorePoolSize_IHandler")>]
member this.CorePoolSize : int with get, set

属性值

线程的核心数

属性

例外

if corePoolSize

注解

属性 getter 文档:

返回线程的核心数。

适用于 . 的 java.util.concurrent.ThreadPoolExecutor.getCorePoolSize()Java 文档

属性 setter 文档:

设置线程的核心数。 这会替代构造函数中设置的任何值。 如果新值小于当前值,则下一次空闲时将终止多余的现有线程。 如果需要,将启动新线程以执行任何排队任务。

适用于 . 的 java.util.concurrent.ThreadPoolExecutor.setCorePoolSize(int)Java 文档

本页的某些部分是根据 Android 开放源代码项目创建和共享的工作进行的修改,并根据 Creative Commons 2.5 属性许可证中所述的术语使用。

适用于

另请参阅