Bounds how many calls may be in flight at once, and how many may wait.
A bulkhead is the thing that keeps one slow dependency from consuming every
connection, socket or worker the process has; it belongs directly around the
work, where the count it holds is the count that matters.
Waiting for a slot ends early if the caller's signal aborts, so a queued
call does not outlive the request that made it, and the queue is served in
order: a slot is handed to whoever has waited longest rather than to
whoever happens to ask next.
Bounds how many calls may be in flight at once, and how many may wait.
A bulkhead is the thing that keeps one slow dependency from consuming every connection, socket or worker the process has; it belongs directly around the work, where the count it holds is the count that matters.
Waiting for a slot ends early if the caller's signal aborts, so a queued call does not outlive the request that made it, and the queue is served in order: a slot is handed to whoever has waited longest rather than to whoever happens to ask next.