eve.core.windows.post
Post/defer callback management for the Windows event loop.
This module manages the defer and post callback queues used by the Windows event loop. Defer callbacks are thread-local and appended during a loop iteration. Post callbacks are thread-safe and drained into the defer queue on the next iteration.
struct PostState
Types 1
structPostState
Manages defer and post callback queues for the event loop.
The defer queue holds callbacks scheduled from the loop thread (via EventLoop.defer). The post queue holds callbacks scheduled from any thread (via EventLoop.post), protected by a mutex.
Fields
void delegate() @safe nothrow[] deferQueuevoid delegate() @safe nothrow[] postQueueHandle postHandleToken postTokenMutex postMutexMethods
void defer(scope void delegate() @safe nothrow callback) @safe nothrowAppend a callback to the defer queue.void ensurePostWakeup(Slot, AllocFn, CheckFn, UpdateFdsFn, SetCbFn)(
scope Slot[] slots,
scope AllocFn allocToken,
scope CheckFn checkLimit,
scope UpdateFdsFn updateFds,
scope SetCbFn setCallback,
ref ulong registrationSeq,
ref size_t watcherCount,
size_t maxWatchers,
size_t openFds,
size_t maxFds) @trusted nothrowLazily create the post wakeup handle and register a watcher slot.