Enum FiberUpdatePriority
- Namespace
- Velvet
- Assembly
- Velvet.Docs.dll
Lane priority for a scheduled re-render. The lane is chosen from the scheduling context, not passed
as an argument. A UseDeferredValue derivation asks for the Transition lane directly; a
hook-driven state update is classified from its context, tested in this order: the Transition lane
while a StartTransition callback is running and has not yet suspended; failing that, the
Urgent lane while a discrete event handler runs; failing that, the Normal lane. A starved Transition
lane is promoted to Normal. Lower numeric values indicate higher priority; a fiber's lane queue
drains lowest-value-first.
public enum FiberUpdatePriority
Fields
Normal = 1Default priority for state updates that are not part of a transition. A starved Transition lane is promoted to it, coalescing with the very traffic that kept preempting it, so the starved work commits with the next Normal drain instead of waiting behind it. Belongs to
FiberBatchScheduler's Immediate tier (drained byDrainImmediate/ registered viaScheduleImmediate).Transition = 2Lowest priority. Taken by the updates a
StartTransitioncallback schedules before it first suspends, and byUseDeferredValuederivations. Its flush is delayed so higher-priority lanes commit first, and once it has been starved for a fixed number of flushes it is promoted to Normal — draining in that same flush, or right after any co-pending Urgent drains;isPendingsurvives until the promoted work commits. Belongs toFiberBatchScheduler's Delayed tier (drained byDrainDelayed/ registered viaScheduleDelayed) until a starvation promotion moves it to the Immediate tier.Urgent = 0Highest priority. Drains ahead of every other lane within a fiber's lane queue. Belongs to
FiberBatchScheduler's Immediate tier (drained byDrainImmediate/ registered viaScheduleImmediate), alongside Normal.