Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r76427 - trunk/boost/asio/detail/impl
From: chris_at_[hidden]
Date: 2012-01-12 05:08:16


Author: chris_kohlhoff
Date: 2012-01-12 05:08:15 EST (Thu, 12 Jan 2012)
New Revision: 76427
URL: http://svn.boost.org/trac/boost/changeset/76427

Log:
Fix deadlock on Mac OS X. Refs #6275.
Text files modified:
   trunk/boost/asio/detail/impl/task_io_service.ipp | 5 ++++-
   1 files changed, 4 insertions(+), 1 deletions(-)

Modified: trunk/boost/asio/detail/impl/task_io_service.ipp
==============================================================================
--- trunk/boost/asio/detail/impl/task_io_service.ipp (original)
+++ trunk/boost/asio/detail/impl/task_io_service.ipp 2012-01-12 05:08:15 EST (Thu, 12 Jan 2012)
@@ -336,7 +336,10 @@
         task_interrupted_ = more_handlers;
 
         if (more_handlers && !one_thread_)
- wake_one_idle_thread_and_unlock(lock);
+ {
+ if (!wake_one_idle_thread_and_unlock(lock))
+ lock.unlock();
+ }
         else
           lock.unlock();
 


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk