eve.core.windows.resources
Internal resource accounting for the Windows event loop.
This module tracks resource usage (watchers, connections, FDs, send queue bytes) and enforces configured limits. It is internal to eve.core.windows and not exposed as public API.
Types 1
structResourceAccounting
Resource accounting and limit enforcement for the event loop.
Tracks active resource usage and provides methods to check limits before allocating new resources.
Fields
private size_t _totalSendQueueBytesprivate size_t _activeConnectionsprivate size_t _openFdsprivate size_t _iterationCountprivate size_t _wakeupCountprivate size_t _errorCountprivate size_t _limitRejectionCountprivate EventLoopConfig _configMethods
void initialize(EventLoopConfig config) @safe nothrow @nogcInitialize resource accounting with the given configuration.ResourceUsage usage(size_t watcherCount, size_t timerCount) const @safe nothrow @nogcGet current resource usage.const(EventLoopLimits) limits() @property const @safe nothrow @nogcGet the resource limits configured for the event loop.size_t openFds() @property const @safe nothrow @nogcGet the current number of open file descriptors.void updateSendQueueUsage(long delta) @safe nothrow @nogcUpdate the total send queue bytes tracked by the loop.void updateConnectionCount(long delta) @safe nothrow @nogcUpdate the active connection count tracked by the loop.void updateOpenFds(long delta) @safe nothrow @nogcUpdate the open file descriptor count tracked by the loop.bool checkLimit(LimitKind kind, size_t current, size_t limit) @safe nothrowInternal: Check if a resource limit is hit.Functions 2
fn
bool limitMatchesWatcher(LimitKind limit, WatcherKind wkind) pure @safe nothrow @nogcCheck whether a watcher kind matches a given limit category.fn
bool dropOldestWatcher(Slot, RemoveFn)(LimitKind kind, scope Slot[] slots,
scope RemoveFn removeFn) @trusted nothrowDrop the oldest watcher matching a limit kind.