![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
windows编程
hoopool
这个作者很懒,什么都没留下…
展开
-
关于sleep(0)
MSDN上Sleep的解释The Sleep function suspends the execution of the current thread for a specified interval.VOID Sleep(DWORD dwMilliseconds // sleep time in milliseconds);ParametersdwMilliseconds Specifies转载 2014-06-01 20:51:43 · 520 阅读 · 0 评论 -
SetEvent与PulseEvent的区别
系统核心对象中的Event事件对象,在进程、线程间同步的时候是比较常用,发现它有两个出发函数,一个是SetEvent,还有一个PulseEvent, 两者的区别是:SetEvent为设置事件对象为有信号状态;而PulseEvent也是将指定的事件设为有信号状态,不同的是如果是一个人工重设事件,正在等候事件的、被挂起的所有线程都会进入活动状态,函数随后将事件设回,并返回;如果是一个 自动重转载 2014-06-01 17:26:12 · 811 阅读 · 0 评论 -
select()函数以及FD_ZERO、FD_SET、FD_CLR、FD_ISSET
select函数用于在非阻塞中,当一个套接字或一组套接字有信号时通知你,系统提供select函数来实现多路复用输入/输出模型,原型: int select(int maxfd,fd_set *rdset,fd_set *wrset,fd_set *exset,struct timeval *timeout); 所在的头文件为:#include 和#include转载 2014-06-27 16:13:29 · 500 阅读 · 0 评论