Re: [Boost-bugs] [Boost C++ Libraries] #3628: condition.notify_one() does not wake up a thread that is in condition.wait() or condition.timed_wait()

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #3628: condition.notify_one() does not wake up a thread that is in condition.wait() or condition.timed_wait()
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2012-08-15 22:21:00


#3628: condition.notify_one() does not wake up a thread that is in
condition.wait() or condition.timed_wait()
---------------------------------------------------+------------------------
  Reporter: Shouaib Ahmed <ranashoaib@…> | Owner: viboes
      Type: Bugs | Status: assigned
 Milestone: To Be Determined | Component: thread
   Version: Boost 1.40.0 | Severity: Problem
Resolution: | Keywords: condition
---------------------------------------------------+------------------------

Comment (by viboes):

 With


 {{{
                 unsigned int i = 0;
                 for (Conditions::iterator it = theConditions.begin();
                         it != theConditions.end() && i < 2;
                         ++it)
                 {
                         (*it)->notify_one();
                         //WORKAROUND_ lockMtx.unlock();
                         //WORKAROUND_ Sleep(50);
                         cout << "Notified One " << theConditions.size() <<
 endl;
                         ++i;
                         //WORKAROUND_ lockMtx.lock();
                 }
 }}}


 only the two first conditions will be notified, so there will be up to 10
 threads that will not be notified.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/3628#comment:8>
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 : 2017-02-16 18:50:10 UTC