MCPcopy Index your code
hub / github.com/duke-git/lancet / ExampleSchedule

Function ExampleSchedule

function/function_example_test.go:136–152  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

134}
135
136func ExampleSchedule() {
137 count := 0
138
139 increase := func() {
140 count++
141 }
142
143 stop := Schedule(2*time.Second, increase)
144
145 time.Sleep(2 * time.Second)
146 close(stop)
147
148 fmt.Println(count)
149
150 // Output:
151 // 2
152}
153
154func ExamplePipeline() {
155 addOne := func(x int) int {

Callers

nothing calls this directly

Calls 1

ScheduleFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…