ResourceAccounting.checkLimit

bool checkLimit(LimitKind kind, size_t current, size_t limit) @safe nothrow

Internal: Check if a resource limit is hit.

This is used by Layer 2 to enforce higher-level limits like connections.

Parameters

kindType of resource being checked
currentCurrent usage of the resource
limitConfigured limit (0 means no limit)

Returns

true if the resource can be allocated, false if limit is exceeded