FutureExecutor class

限制Future最大执行量,提交Future,等待安排执行任务

Constructors

FutureExecutor({int maxSize = 20})

Properties

hashCode int
The hash code for this object.
no setterinherited
maxSize int
最大同时提交任务数
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

clearAll() → void
清空所有等待中的任务队列 被清理的任务,永远不会被执行到
execute(AsyncRun run) → void
提交一个任务执行
executeAll(Iterable<AsyncRun> runs) → void
批量执行任务
getActiveFuture() int
当前活跃的Future
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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