TaskPriority enum
Priority levels for tasks scheduled with BloomScheduler.
Determines execution order in the cooperative work queue. Tasks with higher priority execute before lower-priority tasks. Within the same priority level, tasks run in FIFO (First-In, First-Out) submission order.
Both browser DOM environments and SSR (VM) evaluate scheduled workloads using these priority tiers.
BloomScheduler.schedule(
() => refreshTelemetry(),
priority: TaskPriority.idle,
);
Values
- immediate → const TaskPriority
-
Executed immediately in the current turn without yielding or deferral.
const TaskPriority(0) - userBlocking → const TaskPriority
-
Urgent user-facing interactions that block immediate visual feedback (e.g. typing, clicks).
const TaskPriority(1) - normal → const TaskPriority
-
Standard application updates and default asynchronous workloads.
const TaskPriority(2) - low → const TaskPriority
-
Non-urgent transitions, filtering large lists, or secondary UI updates.
const TaskPriority(3) - idle → const TaskPriority
-
Speculative or deferrable work run only when no higher-priority tasks are waiting.
const TaskPriority(4)
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- index → int
-
A numeric identifier for the enumerated value.
no setterinherited
- indexValue → int
-
Numeric priority level, where lower numeric values represent higher priority.
final
- name → String
-
Available on Enum, provided by the EnumName extension
The name of the enum value.no setter - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
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
Constants
-
values
→ const List<
TaskPriority> - A constant List of the values in this enum, in order of their declaration.