Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

handler_threads配置的问题 #1553

Closed
coderwxl opened this issue May 13, 2024 · 3 comments
Closed

handler_threads配置的问题 #1553

coderwxl opened this issue May 13, 2024 · 3 comments

Comments

@coderwxl
Copy link

wf server中handler_threads我配置的16,然后客户端并发50向wf server发请求,然后我发现wf server创建了50个process线程,不应该是16个吗?

@Barenboim
Copy link
Contributor

你是不是用wait_group了?

@coderwxl
Copy link
Author

是的
image

@Barenboim
Copy link
Contributor

Barenboim commented May 13, 2024

你用wait group相当于堵住了我们一个线程。我们会根据你最多同时堵住我们多少个网络线程来动态增加线程,避免没有活跃的线程可以用。

所以,除了main或者你自己创建的线程里,最好不要调用wait group的wait。对于计算线程,我们是不会动态增加的。所以计算线程绝对不应该wait。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants