MCPcopy Index your code
hub / github.com/golang/groupcache / orderedFlightGroup

Struct orderedFlightGroup

groupcache_test.go:371–376  ·  view source on GitHub ↗

orderedFlightGroup allows the caller to force the schedule of when orig.Do will be called. This is useful to serialize calls such that singleflight cannot dedup them.

Source from the content-addressed store, hash-verified

369// orig.Do will be called. This is useful to serialize calls such
370// that singleflight cannot dedup them.
371type orderedFlightGroup struct {
372 mu sync.Mutex
373 stage1 chan bool
374 stage2 chan bool
375 orig flightGroup
376}
377
378func (g *orderedFlightGroup) Do(key string, fn func() (interface{}, error)) (interface{}, error) {
379 <-g.stage1

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected