c++ thread
来源:互联网 发布:软件质量保证计划内容 编辑:程序博客网 时间:2024/06/14 20:42
HANDLE m_hThread;
HANDLE m_hQuitEvent;
static unsigned __stdcall ProcessData (LPVOID pParam);
m_hQuitEvent = CreateEvent( NULL,TRUE,FALSE,NULL );
m_hThread =
(HANDLE)_beginthreadex(NULL, // Security
0, // Stack size - use default
ProcessData, // Thread fn entry point
(void*) this,
0, // Init flag
NULL);
SetEvent( m_hQuitEvent );
unsigned __stdcall CIOCP::ProcessData(LPVOID pParam)
{
CIOCP* pThis = (CIOCP*)pParam;
if (pThis == NULL)
{
return FALSE;
}
while(TRUE)
{
DWORD dwWaitResult = WaitForSingleObject(pThis->m_hQuitEvent,1000);
switch (dwWaitResult)
{
case WAIT_OBJECT_0:
return 1;
case WAIT_TIMEOUT:
break;
}
}
}
- Thread(C#)
- c thread
- thread.c
- something about thread(c#)
- linux + thread + c (一)
- C#Thread的使用
- 【c++】线程thread类
- c++thread学习(1)
- C++/MFC-线程Thread
- C++:线程(std::thread)
- C#--理解Thread.Sleep函数
- C#--理解Thread.Sleep函数
- 4.多线程实例:thread.c
- 4.多线程实例:thread.c
- C#Thread类—多线程
- C 的 Thread Pool 筆記
- Linux线程的thread.c
- C#Thread的Join方法
- spring与struts1的连接(继承JdbcDaoSupport类的操作)
- 斐波那契的递归算法
- 本人简历
- RSA实现C# 加密详解
- Stardict 真人发音配置
- c++ thread
- 第八章 标准io库
- 获得filter的CLSID的几种方法
- 无时无处不重构 —— 评《重构:改善既有代码的设计》
- 技嘉770T-UD3P 的Realtek HD声卡
- 年轻工程师如何锻炼成高手的
- 常见总线
- ORACLE中的字符串替换 replce、regexp_replace 和 translate
- 互勉