How do I know if a boost thread is done ?

Posted by jules on Stack Overflow See other posts from Stack Overflow or by jules
Published on 2010-05-10T09:00:03Z Indexed on 2010/05/10 9:04 UTC
Read the original article Hit count: 199

Filed under:
|
|

I am using boost::thread to process messages in a queue. When a first message comes I start a message processing thread. When a second message comes I check if the message processing thread is done.

if it is done I start a new one if it is not done I don nothing.

How do I know if the thread is done ? I tried with joinable() but it is not working, as when the thread is done, it is still joinable.

I also tried to interrupt the process at once, and add an interruption point at the end of my thread, but it did not work.

Thanks

© Stack Overflow or respective owner

Related posts about c++

Related posts about boost