Subject: Re: [Boost-bugs] [Boost C++ Libraries] #8884: boost asio in posix_event: lock release before condition signaled
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2014-06-30 14:34:51
#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
Resolution: | Keywords: race multi-thread
-------------------------------+-------------------------------
Comment (by Bjorn Reese <breese@â¦>):
POSIX states that (emphasis added)
"The pthread_cond_broadcast() or pthread_cond_signal() functions may be
called by a thread whether or not it currently owns the mutex that threads
calling pthread_cond_wait() or pthread_cond_timedwait() have associated
with the condition variable during their waits; however, '''if predictable
scheduling behavior is required, then that mutex shall be locked by the
thread calling pthread_cond_broadcast() or pthread_cond_signal()'''."
[http://pubs.opengroup.org/onlinepubs/9699919799/functions/pthread_cond_signal.html]
So I recommend that the patch from Carsten is applied.
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/8884#comment:1> 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:16 UTC