Re: [Boost-bugs] [Boost C++ Libraries] #13212: Windows: condition_variable::notify_one consumes semaphore handles

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #13212: Windows: condition_variable::notify_one consumes semaphore handles
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2018-05-18 14:30:29


#13212: Windows: condition_variable::notify_one consumes semaphore handles
-------------------------+-------------------------------------------------
  Reporter: | Owner: viboes
  henri.hakonen@… |
      Type: Bugs | Status: assigned
 Milestone: To Be | Component: thread
  Determined |
   Version: Boost | Severity: Problem
  1.65.0 | Keywords: condition_variable, notify_one,
Resolution: | semaphore, handles, Windows
-------------------------+-------------------------------------------------

Comment (by henri.hakonen@…):

 It seems that problem is gone now when I test with boost 1.67.0. There is
 no leak anymore.

 I think that this problem was specific to boost 1.65.0. My quick fix was
 to comment one line in condition_variable.hpp. (here X: (upper) is my
 version of 1.65.0 and E: (lower) is original boost.

 X:\boost\thread\win32>fc condition_variable.hpp
 e:\prj\boost_git\libs\thread\include\boost\thread\win32\condition_variable.hpp
 Comparing files condition_variable.hpp and
 E:\PRJ\BOOST_GIT\LIBS\THREAD\INCLUDE\BOOST\THREAD\WIN32\CONDITION_VARIABLE.HPP
 ***** condition_variable.hpp
 {{{
               // do it here to avoid throwing on the destructor
               //entry->remove_waiter();
               locker.lock();
 }}}
 *****
 E:\PRJ\BOOST_GIT\LIBS\THREAD\INCLUDE\BOOST\THREAD\WIN32\CONDITION_VARIABLE.HPP
 {{{
               // do it here to avoid throwing on the destructor
               entry->remove_waiter();
               locker.lock();
 }}}
 *****

-- 
Ticket URL: <https://svn.boost.org/trac10/ticket/13212#comment:4>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2018-05-18 14:36:23 UTC