Re: [Boost-bugs] [Boost C++ Libraries] #7669: thread_group::join_all() should catch resource_deadlock_would_occur

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #7669: thread_group::join_all() should catch resource_deadlock_would_occur
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2012-11-09 20:22:32

#7669: thread_group::join_all() should catch resource_deadlock_would_occur
  Reporter: boost.lists@… | Owner: anthonyw
      Type: Bugs | Status: new
 Milestone: To Be Determined | Component: thread
   Version: Boost 1.52.0 | Severity: Problem
Resolution: | Keywords: thread;thread_group

Comment (by viboes):

 Replying to [comment:2 Igor R. <boost.lists@…>]:
> This would make thread_group unusable in the cases where the above
 precondition cannot be enforced. The question is why it's better than my

 You are right, the user can not check this pre-condition as it has no
 access to the threads in the group other than duplicating. But calling to
 join_all and joining all but one of the threads don't respect either the
 post-conditions. I don't think it is a good design to to request to join
 on itself.

 I planned to deprecate thread_group so I don't want to invest too much on

 I guess there are two options:
 - the implementation check always if the this_thread is in the thread
 group and throw a specific exception, or
 - the library provides a function that states if this_thread is in the
 thread group, so that the user that is in a context that the current
 thread could be one of the group could check it. The join_all function has
 the Require clause described above.

 What do you think?
 What do you think?

Ticket URL: <>
Boost C++ Libraries <>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:11 UTC