tree: 031aef6f3501e4d3b2f3569b4b8ab30c5c32a91e [path history] [tgz]
  1. .golangci.yaml
  2. LICENSE
  3. README.md
  4. singleflight.go
  5. withoutcancel.go
  6. withoutcancel_go121.go
vendor/resenje.org/singleflight/README.md

Singleflight

GoDoc Go

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.