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

TCPServer 的 thread_num 有什么作用 ? ,为什么要建立多个 EventLoopThreadPool ? 1 和 4 有什么区别吗? #305

Open
netfbi opened this issue Aug 18, 2023 · 1 comment

Comments

@netfbi
Copy link

netfbi commented Aug 18, 2023

// @param thread_num - The working thread count
TCPServer(EventLoop* loop,
const std::string& listen_addr/ip:port/,
const std::string& name,
uint32_t thread_num);

这个 working thread count ,指的是 EventLoopThreadPool 的个数,为什么要建立多个? 1 和 4 有什么区别吗?

@netfbi
Copy link
Author

netfbi commented Aug 18, 2023

这个 working thread 可以替代 处理业务的线程吗?

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

1 participant