Windows下临界区的使用CRITICAL_SECTION

临界区设置锁,当有线程进入临界区后设置为锁止状态,其它线程访问同一临界区锁控制的变量时被阻塞。

具体例程见以下链接:

http://blog.csdn.net/ccrrt/article/details/8099297

上述链接中同时涵盖了WaitForMultipleObjects()函数的使用范例。

posted @ 2015-09-18 14:35  chentianbao  Views(256)  Comments(0Edit  收藏  举报