Correct way of checking if threads are done?

前端 未结 6 739
一向
一向 2020-12-18 05:10

I\'m using multithreading in my application with _beginthread and right now to wait until all threads are done I have global bools that get set to true as each thread comple

6条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-12-18 05:26

    You can use boost::thread objects. Call join on the object and it will wait for the thread to finish.

提交回复
热议问题