priority property
The execution priority of this pulse (0‑100, higher = more urgent).
When to use
- Execution Scheduling: Set this when you need a pulse to jump the queue — for emergency signals or user‑facing interactions that demand low latency.
- User‑facing interactions needing low latency.
- Emergency signals that must preempt others.
- Background tasks that can wait.
- Critical system operations.
How it works
The framework's dispatcher uses this to prioritise signals. Higher priority pulses are processed before lower priority ones.
Priority Tiers (recommended)
- 0‑20: Background (telemetry, maintenance)
- 21‑50: Routine (standard operations)
- 51‑80: High (user interactions)
- 81‑95: Critical (system safety)
- 96‑100: Emergency (system recovery)
Example
final urgent = Pulse.governed<int>(
payload: 42,
priority: 95, // Critical
);
Implementation
@override
int get priority {
int local() {
return get<int>(() => _record.root.tertiary.priority,
fallback: () => _parent?.priority, orElse: Pulse.defaultPriority);
}
if (context != PulseContext.system) {
return context.priority ?? local();
}
return local();
}