PhaseWatchers.dispatch
ptrdiff_t dispatch(Slot, DispatchFn)(
WatcherKind kind,
scope Slot[] slots,
scope DispatchFn dispatchFn) @trusted nothrowDispatch 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
kind | Phase watcher kind to dispatch. |
slots | Watcher slot array to scan. |
dispatchFn | Callback to dispatch individual watcher tokens. |
Returns
Number of watchers successfully dispatched.