TaskQueue class
This class is used for task management. Tasks are processed in an asynchronous way when there is idle time within a single simulation step or after a defined amount of time (deadline). The class is a wrapper around {@link https://w3.org/TR/requestidlecallback|requestidlecallback()}, a JavaScript API for cooperative scheduling of background tasks.
Constructors
- TaskQueue()
- Constructs a new task queue.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- options ↔ Duration
-
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- stopwatch ↔ Stopwatch
-
getter/setter pair
- taskHandle ↔ Future?
-
getter/setter pair
-
tasks
↔ List<
Task> -
getter/setter pair
Methods
-
enqueue(
Task task) → TaskQueue - Adds the given task to the task queue.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
runTaskQueue(
) → void - This function controls the processing of tasks. It schedules tasks when there is idle time at the end of a simulation step.
-
toString(
) → String -
A string representation of this object.
inherited
-
update(
) → TaskQueue - Updates the internal state of the task queue. Should be called per simulation step.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited