如何在主线程中检查某个子线程是否被挂起还是执行中

fenex 2003-02-20 10:59:21
子线程是一个CWinThread的对象
如提
...全文
202 5 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
codeproject 2003-02-20
  • 打赏
  • 举报
回复
ResumeThread

The ResumeThread function checks the suspend count of the subject thread. If the suspend count is zero, the thread is not currently suspended. Otherwise, the subject thread's suspend count is decremented. If the resulting value is zero, then the execution of the subject thread is resumed.

winay_dd 2003-02-20
  • 打赏
  • 举报
回复
问楼上,被唤醒是不是就是线程准备运行?
demetry 2003-02-20
  • 打赏
  • 举报
回复
用CWinThread::ResumeThread

如果返回值为大于1;则线程被挂起;如果返回值为1;则线程正在被唤醒;如果返回值为0,则线程处于激活状态
icelight 2003-02-20
  • 打赏
  • 举报
回复
mark
chenghl 2003-02-20
  • 打赏
  • 举报
回复
好象用GetThreadState()函数(可能函数名不对,功能是的),可以查MSDN.

15,473

社区成员

发帖
与我相关
我的任务
社区描述
VC/MFC 进程/线程/DLL
社区管理员
  • 进程/线程/DLL社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧