Dedup

/dedup Tier 2

Per-action request deduplication. Concurrent identical requests collapse into a single execution; all waiters share the result. Cancellation of a waiter cancels the in-flight call (contrast with Coalesce).

caller Acaller Bcaller Cin-flightshared callkey=SKU-42handler1 executionshared result → all waitersPer-action singleflight: caller cancel returns ctx.Err() to that waiter only

Signature

action contract
.Dedup(keyFn func(Req) string) *Builder[Req, Res]