Rate limiting and cancellationadvanced
A proxy in front of a paid API needs a rate limit or one user can spend your whole budget, and a cancellation token so a closed browser tab stops the work.
One unresponsive host holds the whole import open. A token is accepted and ignored.
A per-call deadline, linked to the caller’s token, honoured in the loop, and disposed.
Published in full, before you start — every point is one of these and there is nothing else.
A proxy in front of a paid API needs a rate limit or one user can spend your whole budget, and a cancellation token so a closed browser tab stops the work.
A file handle or socket you opened is yours to release — the Dispose pattern is how a caller gets to say "I am finished with this" instead of waiting for a collection that may never come.