摘要:
转自:http://www.itcodeworld.com/?p=105使用结构CRITICAL_SECTION 需加入头文件#include “afxmt.h”定义一个全局的锁 CRITICAL_SECTION的实例和一个静态全局变量[代码]创建两个线程函数,代码实现如下:代码在主函数添加以下代码代码输出:n_AddValue in FirstThread is 1n_AddValue in FirstThread is 2n_AddValue in FirstThread is 3n_AddValue in FirstThread is 4n_AddValue in FirstThread 阅读全文
posted @ 2010-12-20 17:45 Bill Yuan 阅读(13199) 评论(0) 推荐(0) 编辑