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

Question to API “service->startWorkerThread(xxx)” #109

Open
eeyrw opened this issue Dec 6, 2021 · 2 comments
Open

Question to API “service->startWorkerThread(xxx)” #109

eeyrw opened this issue Dec 6, 2021 · 2 comments

Comments

@eeyrw
Copy link

eeyrw commented Dec 6, 2021

Is this API to set the capacity of internal thread pool? Furthermore, how does the brynet schedule the multiple tcp clients to these threads? Such as num of clients greater than num of threads.

@IronsDu
Copy link
Owner

IronsDu commented Dec 7, 2021

  1. this API set the number of IO thread. (so, not a capacity)
  2. One client is processed in one changeless IO thread. It initialized in https://github.com/IronsDu/brynet/blob/master/include/brynet/net/detail/TCPServiceDetail.hpp#L96 by random.

@eeyrw
Copy link
Author

eeyrw commented Dec 8, 2021

Got it. Thank you.

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