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

Discussion about the poller thread #221

Open
Nic-bit opened this issue Mar 25, 2024 · 0 comments
Open

Discussion about the poller thread #221

Nic-bit opened this issue Mar 25, 2024 · 0 comments

Comments

@Nic-bit
Copy link

Nic-bit commented Mar 25, 2024

What do you think about using a coroutine pool to handle the event tasks listened by epoll in the poller thread? Would this improve performance? Is there a big difference between one thread handling multiple tasks and starting several coroutines in a thread to handle tasks? For example, in network communication, the tasks handled by the poller thread are mostly IO tasks. If they are replaced with coroutines, performance should improve somewhat. Can the author give some suggestions? Thanks.

作者你觉得在poller线程中,使用一个协程池来处理epoll监听的事件任务怎么样,这样对性能提升有效吗?一个线程处理多个任务,跟在线程中起几个协程来处理任务差别大吗,像网络通信中,poller线程处理的任务大多是IO任务,如果换成协程,性能应该有些提升。作者可以给些建议吗?感谢

TRANS_BY_GITHUB_AI_ASSISTANT

@alexliyu7352 alexliyu7352 changed the title 关于poller线程的讨论 Discussion about the poller thread Sep 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants