eve.core.kqueue.phases

Phase watcher management for the kqueue event loop.

This module provides internal support for PREPARE, CHECK, and IDLE phase watchers. Phase watchers execute at specific points during each iteration of the event loop rather than in response to external events.

Types 1

Phase watcher state and dispatch management.

Maintains a buffer of phase watcher tokens for efficient dispatch and provides counting and filtering operations for phase-only watcher detection.

Fields
size_t _dispatchCount
Token[] _buffer
Methods
void initialize(size_t capacity) @trusted nothrowInitialize phase watcher state with a given buffer capacity.
void dispose() @trusted nothrowReset phase watcher state and release resources.
ptrdiff_t count(Slot)(WatcherKind kind, scope const(Slot)[] slots) const pure @safe nothrow @nogcCount enabled phase watchers of a specific kind.
ptrdiff_t dispatch(Slot, DispatchFn)( WatcherKind kind, scope Slot[] slots, scope DispatchFn dispatchFn) @trusted nothrowDispatch all enabled watchers of a specific phase.
bool hasOnlyPhaseWatchers(Slot)(scope const(Slot)[] slots) const @safe nothrow @nogcCheck if only phase watchers exist (no I/O, timers, signals, or DNS).