IsolateExecutor class

隔离线程池

Constructors

IsolateExecutor({String executorName = 'IsolateExecutor', required int maximumPoolSize, int corePoolSize = 0, int keepActiveTime = 120})

Properties

activeThread int
当前活跃的线程
getter/setter pair
corePoolSize int
核心线程数
final
executorName String
线程池的名称,该名称会作为isolate的名称前缀
final
hashCode int
The hash code for this object.
no setterinherited
keepActiveTime int
最大空闲时间(秒)
final
maximumPoolSize int
最大线程数
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

cancel(int asyncId) bool
取消任务,无法取消正在执行的任务
execute<Q>(ComputeCallback0<Q> callback, Q params) int
执行线程
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
shutdown() → void
停止线程池
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited