1
0
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:
dudaodong
2023-01-09 11:25:14 +08:00
parent adaa3ebc43
commit d4bba76dc8

View File

@@ -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() {