PriorityExecutor<O> class
Creates a Executor
that handles its waiting queue with a PriorityPool
O
- Output type of the PriorityTask
Constructors
-
PriorityExecutor({List<
PriorityTask< ? initialTasks, int maxConcurrentTasks = 1})O> > -
Creates a
Executor
that handles its waiting queue with aPriorityPool
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- isDisposed → bool
-
Returns
true
ifExecutor.dispose
was calledno setterinherited - isDone → bool
-
Returns
true
if theExecutor
has finished all its jobsno setterinherited - isRunning → bool
-
Returns
true
if the semaphore has some running tasks or some waiting tasksno setterinherited - runningTasks → int
-
Returns the number of tasks that are currently running
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- semaphore → Semaphore
-
final
-
tasks
→ List<
PriorityTask< O> > -
final
- waitingTasks → int
-
Returns the number of tasks that are currently waiting
no setterinherited
-
waitUntilDone
→ Future<
void> -
Returns when all the tasks are done
no setterinherited
Methods
-
addTask(
AsyncTask< O> task) → void -
Adds a new AsyncTask to the BaseExecutor
inherited
-
bulkChangePriority(
Map< int, List< taskIds) → voidint> > -
Changes the priority of all tasks contained in
taskIds
-
changePriority(
int taskId, int priority) → void -
Modifies the priority of the task
taskId
-
dispose(
) → void -
Closes all the running AsyncTasks and disposes the
Executor
inherited -
getResult(
int taskId) → Future< O?> -
Returns the Future that will complete when the task of
id
is finishedinherited -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
registerTasks(
) → void -
inherited
-
start(
) → void -
Executes all the AsyncTasks defined in the constructor with
the
_maxConcurrentTasks
parameter specifiedinherited -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited