Open wowo666 opened 7 months ago
OS: mac GO: go1.17.12 ants: v2.9.0 使用方式 : pool:= ants.NewPool(50, ants.WithExpiryDuration(5*time.Second)) 当我通过pool..Submit(funcxx) 用完 pool里worker时, 会一直阻塞无法再继续submit,等了1个小时也没释放执行完的worker
v2
v2.9.0
macOS
14.2.1 (23C71)
go1.17.12
for _, v := range administrative.Child { firstData := *v fmt.Print("开始submit") err := vars.CronPool.Submit(func() { c.checkFirstData(context.Background(), &firstData) }) fmt.Print("提交完submit") if err != nil { vars.ErrorLogger.WithFields(yklog.Fields{"firstData": firstData}).Errorf(ctx, "创建 检查第一级(省or市)数据异步任务失败: %s", err.Error()) _err = err } }
No response
I haven't verified it with the latest release
你提交的任务是不是都卡住了?需要等有任务结束之后新的任务才能被运行,否则就是会阻塞住。
Actions I've taken before I'm here
What happened?
OS: mac GO: go1.17.12 ants: v2.9.0 使用方式 : pool:= ants.NewPool(50, ants.WithExpiryDuration(5*time.Second)) 当我通过pool..Submit(funcxx) 用完 pool里worker时, 会一直阻塞无法再继续submit,等了1个小时也没释放执行完的worker
Major version of ants
v2
Specific version of ants
v2.9.0
Operating system
macOS
OS version
14.2.1 (23C71)
Go version
go1.17.12
Relevant log output
Code snippets (optional)
No response
How to Reproduce
Does this issue reproduce with the latest release?
I haven't verified it with the latest release