2015年7月25日

poll机制分析

摘要: 原作者:韦东山int poll(struct pollfd *fds, nfds_t nfds, int timeout) 的时候可以通过把timeout设置成0的方式避免线程睡眠(busy wait),从而避免线程上下文切换造成的latency。不过这种方式会导致CPU使用率到达100%。所以如果... 阅读全文

posted @ 2015-07-25 16:35 CasperWu 阅读(248) 评论(0) 推荐(0)

导航