0

What happens to thread run under Windows OS, when the timeout occurs using boost::thread::timed_join, and the waiting thread finishes? Does the thread remain or it finishes along with the process?

4

1 回答 1

1

It doesn't matter why a thread finishes (exits), what matters is whether this is the main thread or not: if it's the main thread, then the whole process exits, and all its threads get terminated; if it's a non-main thread, its graceful exit doesn't affect any other threads.

The following article explains a process termination in detail.

于 2012-07-31T17:11:19.807 回答