MCPcopy
hub / github.com/CodisLabs/codis / SleepWithCancel

Method SleepWithCancel

pkg/proxy/delay.go:44–49  ·  view source on GitHub ↗
(canceled func() bool)

Source from the content-addressed store, hash-verified

42}
43
44func (d *DelayExp2) SleepWithCancel(canceled func() bool) {
45 total := d.NextValue()
46 for i := 0; i != total && !canceled(); i++ {
47 time.Sleep(d.Unit)
48 }
49}

Callers

nothing calls this directly

Calls 2

NextValueMethod · 0.95
SleepMethod · 0.65

Tested by

no test coverage detected