ThreadPoolExecutor.AllowsCoreThreadTimeOut 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
如果此池允许核心线程超时,并在 keepAlive 时间内没有任务到达,则返回 true,如果新任务到达时需要替换。
[Android.Runtime.Register("allowsCoreThreadTimeOut", "()Z", "GetAllowsCoreThreadTimeOutHandler")]
public virtual bool AllowsCoreThreadTimeOut();
[<Android.Runtime.Register("allowsCoreThreadTimeOut", "()Z", "GetAllowsCoreThreadTimeOutHandler")>]
abstract member AllowsCoreThreadTimeOut : unit -> bool
override this.AllowsCoreThreadTimeOut : unit -> bool
返回
true 如果允许核心线程超时,则为 false
- 属性
注解
如果此池允许核心线程超时,并在 keepAlive 时间内没有任务到达,则返回 true,如果新任务到达时需要替换。 如果为 true,应用于非核心线程的相同保持活动策略也适用于核心线程。 如果为 false(默认值),则不会由于缺少传入任务而终止核心线程。
已在 1.6 中添加。
适用于 . 的 java.util.concurrent.ThreadPoolExecutor.allowsCoreThreadTimeOut()Java 文档
本页的某些部分是根据 Android 开放源代码项目创建和共享的工作进行的修改,并根据 Creative Commons 2.5 属性许可证中所述的术语使用。