ConcurrencyLimit

Lock-free atomic-counter ceiling. Rejects excess calls with ErrConcurrencyLimit before any retry or circuit-breaker logic runs. Use to protect handlers from being overwhelmed by their own callers.

atomic.Int3247/ 50 limit3 slots freecall #1call #2call #3call #4calls #1, #2, #3 PASS+1 → next(ctx, req)call #4 REJECTEDcount.Add(-1)ErrConcurrencyLimitatomic.Int32 counter — Add(1) → if > limit (50), Add(-1) and fast-reject

Signature

action contract
.ConcurrencyLimit(limit int32) *Builder[Req, Res]