-
Notifications
You must be signed in to change notification settings - Fork 562
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
这里是不是有bug #31
Comments
协程池是有的,可以看看 |
感谢回复,没有认真看代码,不好意思。 |
1和3都提到了
其实流程是一样的,都是协程完成任务后,将自己塞到一个 空闲协程列表 里;再有任务到来时,从列表里取空闲协程。 |
感谢解答,学到了不少,哈哈! |
bool UThreadEpollScheduler::Run() 中
业务线程开启协程时,epoll_wait可能会被业务fd唤醒,但handler_new_request_func_被注册,
就会被调用处理新请求,Worker::HandlerNewRequestFunc()函数中貌似是阻塞取io线程的消息的,这样的话业务中的其他协程就会暂时挂起,影响性能。
PS:从性能测试看,短连接、长连接的性能差距蛮大的,有没有考虑cache 协程的方案?
即:进程启动后就开启N个IO协程,当accept到连接时使用缓存的协程等待读,读取完数据不销毁协程;业务协程同理。
The text was updated successfully, but these errors were encountered: