Allenxuxu / gev

🚀Gev is a lightweight, fast non-blocking TCP network library / websocket server based on Reactor mode. Support custom protocols to quickly and easily build high-performance servers.
MIT License
1.72k stars 193 forks source link

关于EventLoop.QueueInLoop的一个疑问 #98

Closed liyonglion closed 3 years ago

liyonglion commented 3 years ago

EventLoop.QueueInLoop的作用是什么?为什么新的connection需要加入到taskQueueW中后调用poll.Wake(),然后再doPendingFunc中回调将新的connection加入到epoll中。为什么不直接将connection直接加入epoll中,原因是什么?谢谢

Allenxuxu commented 3 years ago

可以看下这个讨论:https://www.zhihu.com/question/49741301

liyonglion commented 3 years ago

感谢~