We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8fa622a commit c6c22d2Copy full SHA for c6c22d2
_example/example02/main.go
@@ -33,10 +33,12 @@ func main() {
33
// assign tasks in queue
34
for i := 0; i < taskN; i++ {
35
go func(i int) {
36
- q.QueueTask(func(ctx context.Context) error {
+ if err := q.QueueTask(func(ctx context.Context) error {
37
rets <- fmt.Sprintf("Hi appleboy, handle the job: %02d", +i)
38
return nil
39
- })
+ }); err != nil {
40
+ panic(err)
41
+ }
42
}(i)
43
}
44
0 commit comments