Coalesce

Cross-action request coalescing via a shared *Coalescer. Identical to Dedup but: (1) one coalescer can span multiple actions, (2) a canceled waiter exits cleanly while the in-flight call KEEPS RUNNING for other waiters.

Caller 1 (cancels)Caller 2 (waiting)*CoalesceractionName:keyc.pending[fullKey]waiters: atomic.Int32In-flight Executioncontext.WithoutCancel1 handler runshared result → delivered to Caller 2Caller 1 cancels → returns ctx.Err() immediatelyIn-flight handler NEVER aborted — runs to completion for remaining waiters

Signature

action contract
.Coalesce(c *Coalescer, keyFn func(Req) string) *Builder[Req, Res]