2

I am using boost::thread, how can I tell if a thread is still running from another thread?

Thanks.

2607
  • 4,037
  • 13
  • 49
  • 64
  • 1
    Pretty much this question, right?http://stackoverflow.com/questions/1667420/how-can-i-tell-reliably-if-a-boost-thread-has-exited-its-run-method Except you have to put the thread you want to check as reference/pointer argument to the other thread – Tim Feb 23 '12 at 17:36

1 Answers1

2

The general answer would be that you can't, but if you just want to check so as to avoid blocking in join, there's a timed_join function.

James Kanze
  • 150,581
  • 18
  • 184
  • 329