Replies: 1 comment
-
|
pool 主要是用来复用并节省资源,看你自己的场景需不需要 pool。 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
对这个程序初步的理解它是个消费者?提交task,worker进行消费,当消费达到worker数量的上限时,会阻塞。
如果想实现一个异步任务,同步请求过程中将耗时的任务扔到一个channel里面,另起一个goroutine消费这个channel的task,调用ants.Submit(task)执行任务是否可行?有没有什么好的practice分享呐?
Beta Was this translation helpful? Give feedback.
All reactions