mirror of
https://github.com/moby/moby.git
synced 2026-01-11 18:51:37 +00:00
full diff: https://resenje.org/singleflight/compare/v0.4.1...v0.4.3 Changes: - Fix incorrect `Forget` behavior - Make panic behavior consistent with x/sync package Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
782 B
782 B
Singleflight
Package singleflight provides a duplicate function call suppression mechanism similar to golang.org/x/sync/singleflight but with:
- support for context cancelation. The context passed to the callback function is a context that preserves all values from the passed context but is cancelled by the singleflight only when all awaiting caller's contexts are cancelled.
- support for generics.
Installation
Run go get resenje.org/singleflight from command line.