qiankunli.github.io icon indicating copy to clipboard operation
qiankunli.github.io copied to clipboard

runtime对net IO切换时机的问题 | golang 系统调用与阻塞处理

Open lysShub opened this issue 2 years ago • 0 comments

golang 系统调用与阻塞处理 你说到go对net IO有专门的优化,不会阻塞M。

但是有个问题就是,net IO在读写频繁时,理论上来说不切换G性能更高,读取下一个数据包等待的代价低于G切换的代价。所以我想问一下,go是直接切换的还是有一些什么策略?

lysShub avatar Oct 13 '22 06:10 lysShub