eve.core.watcher

Shared Layer 1 watcher identifiers and flags.

Types 3

enumWatcherKind : ubyte

Watcher categories supported by Layer 1.

NONESentinel value for an unused slot.
IOReadiness watcher backed by a Layer 0 handle registration.
TIMERTimer watcher driven by the loop's monotonic timer source.
SIGNALSignal watcher bridged into the loop through a Linux `signalfd`.
WAKEUPCross-thread wakeup watcher bridged into the loop through `eventfd`.
PREPARECallback run before backend polling.
CHECKCallback run after event dispatch in each iteration.
IDLECallback run when an iteration finishes with no dispatched work.
DNSAsynchronous DNS resolution watcher.

Bit-mask describing watcher state inside the loop.

Fields
ushort bitsRaw bit-mask storage.
WatcherFlags(0) noneEmpty flag set.
WatcherFlags(1 << 0) enabledWatcher is currently enabled in the loop/backend.
WatcherFlags(1 << 1) dispatchingWatcher callback is currently being dispatched.
WatcherFlags(1 << 2) pendingRemovalWatcher should be removed after the current callback returns.
Methods
bool contains(WatcherFlags other) const pure @safe nothrow @nogcCheck whether all bits from `other` are present.
WatcherFlags opBinary(string op : "|")(WatcherFlags other) const pure @safe nothrow @nogcCombine two watcher flag masks.
WatcherFlags opBinary(string op : "&")(WatcherFlags other) const pure @safe nothrow @nogcRemove bits from a watcher flag mask.
WatcherFlags opOpAssign(string op : "|")(WatcherFlags other) ref pure @safe nothrow @nogcAppend bits from `other` in place.
WatcherFlags opOpAssign(string op : "&")(WatcherFlags other) ref pure @safe nothrow @nogcClear bits from `other` in place.
bool opCast(T : bool)() const pure @safe nothrow @nogcConvert the flag set to `true` when any flag bit is present.
structToken

Stable handle to a watcher slot inside an event loop.

Fields
uint indexSlot index inside the loop.
uint generationGeneration counter guarding slot reuse.
Token(uint.max, 0) invalidSentinel invalid token.
Methods
bool isValid() @property const pure @safe nothrow @nogcReport whether this token refers to a live loop slot.