mirror of
https://gitee.com/johng/gf
synced 2026-06-06 02:25:47 +08:00
improve example for package gqueue
This commit is contained in:
@ -24,8 +24,6 @@ func ExampleNew() {
|
||||
q.Push(i)
|
||||
}
|
||||
|
||||
fmt.Println(q.Len())
|
||||
|
||||
// Close the queue in three seconds.
|
||||
gtimer.SetTimeout(context.Background(), time.Second*3, func(ctx context.Context) {
|
||||
q.Close()
|
||||
@ -55,7 +53,6 @@ func ExampleNew() {
|
||||
}
|
||||
|
||||
// Output:
|
||||
// 10
|
||||
// 0123456789
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user