PriorityExecutor<O> class

Creates a Executor that handles its waiting queue with a PriorityPool

O - Output type of the PriorityTask

Constructors

PriorityExecutor({List<PriorityTask<O>>? initialTasks, int maxConcurrentTasks = 1})
Creates a Executor that handles its waiting queue with a PriorityPool

Properties

hashCode int
The hash code for this object.
no setterinherited
isDisposed bool
Returns true if Executor.dispose was called
no setterinherited
isDone bool
Returns true if the Executor has finished all its jobs
no setterinherited
isRunning bool
Returns true if the semaphore has some running tasks or some waiting tasks
no 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<int>> taskIds) → void
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 finished
inherited
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 specified
inherited
toString() String
A string representation of this object.
inherited

Operators

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