mirror of
https://github.com/duke-git/lancet.git
synced 2026-02-04 12:52:28 +08:00
fix: fix ExampleSchedule failed
This commit is contained in:
@@ -114,15 +114,15 @@ func ExampleSchedule() {
|
|||||||
count++
|
count++
|
||||||
}
|
}
|
||||||
|
|
||||||
stop := Schedule(1*time.Second, increase)
|
stop := Schedule(2*time.Second, increase)
|
||||||
|
|
||||||
time.Sleep(3 * time.Second)
|
time.Sleep(2 * time.Second)
|
||||||
close(stop)
|
close(stop)
|
||||||
|
|
||||||
fmt.Println(count)
|
fmt.Println(count)
|
||||||
|
|
||||||
// Output:
|
// Output:
|
||||||
// 3
|
// 2
|
||||||
}
|
}
|
||||||
|
|
||||||
func ExamplePipeline() {
|
func ExamplePipeline() {
|
||||||
|
|||||||
Reference in New Issue
Block a user