花费 27 ms
libuv的多线程之间传递消息

官网上给出的例子http://nikhilm.github.io/uvbook/threads.html#inter-thread-communication,中文理解在后边 Inter-threa ...

Sat Aug 30 00:24:00 CST 2014 0 8876
如何降低死循环的 CPU 占用

有的时候程序中需要使用死循环,比如消息监听就要用一个死循环,直到受到消息请求关闭才可能跳出循环。 一个 while(true){} 的循环中即便循环体是空的,也会占用几乎一整个 CPU 核心。为了降 ...

Thu May 23 02:10:00 CST 2019 0 526

 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM