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.73k stars 194 forks source link

控制EpollWait的msec优势在哪? #128

Open M6ZeroG opened 2 years ago

M6ZeroG commented 2 years ago

https://github.com/Allenxuxu/gev/blob/16e310c2338c31a48ab627a2ba39097317e1dfe3/poller/epoll.go#L145-L156 阻塞的EpollWait调用在阻塞线程时应该也会主动让出CPU吧,看上去效果和上面runtime.Gosched() 的效果一样。还是说这里有什么神奇操作。