
21 Jan
2010
21 Jan
'10
8:51 a.m.
watsonsong wrote:
I am puzzling about the join_all() function. Whether is it safe to invoke boost::thread_group::create_thread in an other thread and the join_all will wait for all the tow thread?
Calling join_all from within a thread of the thread_group would most certainly result in a deadlock because the thread would wait for itself to finish. So if you have a thread_group and one thread is supposed to wait for all other threads to finish, this one thread should not be part of the thread_group. Regards, Roland