[Boost-bugs] [Boost C++ Libraries] #8884: boost asio in posix_event: lock release before condition signaled

Subject: [Boost-bugs] [Boost C++ Libraries] #8884: boost asio in posix_event: lock release before condition signaled
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2013-07-23 09:47:28


#8884: boost asio in posix_event: lock release before condition signaled
-------------------------------+----------------------------
 Reporter: carsten.becker@… | Owner: chris_kohlhoff
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: asio
  Version: Boost 1.54.0 | Severity: Problem
 Keywords: race multi-thread |
-------------------------------+----------------------------
 valgrind drd warns about a possible race condition ...
 (possible patch:)

 Index: boost/asio/detail/posix_event.hpp
 ===================================================================
 --- boost/asio/detail/posix_event.hpp (Revision 85130)
 +++ boost/asio/detail/posix_event.hpp (Arbeitskopie)
 @@ -58,8 +58,8 @@
    {
      BOOST_ASIO_ASSERT(lock.locked());
      signalled_ = true;
 + ::pthread_cond_signal(&cond_); // Ignore EINVAL.
      lock.unlock();
 - ::pthread_cond_signal(&cond_); // Ignore EINVAL.
    }

    // Reset the event.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/8884>
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:13 UTC