|
Boost Users : |
Subject: Re: [Boost-users] Question about the boost::thread_group
From: Roland Bock (rbock_at_[hidden])
Date: 2010-01-21 03:51:18
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
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net