首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > C语言 >

有关线程的有关问题

2012-02-14 
有关线程的问题创建一个线程CreateThread,那怎么知道该线程何时结束呢?[解决办法]一、你要等待线程结束,使

有关线程的问题
创建一个线程CreateThread,那怎么知道该线程何时结束呢?

[解决办法]
一、你要等待线程结束,使用WaitSingleObject()
二、你只是想知道线程结束的时间,让线程结的时候做些记号就是了。

[解决办法]
When a thread terminates, the thread object attains a signaled state, satisfying any threads that were waiting on the object.

The thread object remains in the system until the thread has terminated and all handles to it have been closed through a call to CloseHandle.

热点排行