coolbear

DWORD SuspendThread ( HANDLE hThread );   //挂起线程
DWORD ResumeThread ( HANDLE hThread );   //恢复线程

 

比如说我使用一个渲染线程thread1负责在一个窗口中绘制三维场景,

一个button负责加载模型,当需要加载的模型数量很多、模型较大时,需要暂停一下thread1

void MyTestDlg::OnBnClickedButton1()

{

  SuspendThread(thread1);

  loadModels();

  ResumeThread(thread1);

}

分类:

技术点:

相关文章:

  • 2021-12-12
  • 2021-05-04
  • 2021-10-16
  • 2021-10-16
  • 2021-10-12
  • 2021-12-12
  • 2021-10-16
猜你喜欢
  • 2021-12-12
  • 2021-08-08
  • 2021-11-08
  • 2021-10-16
  • 2021-10-16
  • 2021-10-16
  • 2021-10-16
相关资源
相似解决方案