PhaseWatchers.dispatch

ptrdiff_t dispatch(Slot, DispatchFn)( WatcherKind kind, scope Slot[] slots, scope DispatchFn dispatchFn) @trusted nothrow

Dispatch all enabled watchers of a specific phase.

Builds a snapshot of enabled phase watchers into the internal buffer, then dispatches each one. Watchers are dispatched in registration order. The buffer grows automatically if needed.

Parameters

kindPhase watcher kind to dispatch.
slotsWatcher slot array to scan.
dispatchFnCallback to dispatch individual watcher tokens.

Returns

Number of watchers successfully dispatched.