Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r78664 - trunk/boost/asio/detail/impl
From: chris_at_[hidden]
Date: 2012-05-26 18:22:47


Author: chris_kohlhoff
Date: 2012-05-26 18:22:46 EDT (Sat, 26 May 2012)
New Revision: 78664
URL: http://svn.boost.org/trac/boost/changeset/78664

Log:
Last version's race-condition-related revert in the epoll_reactor was
incomplete and broke out-of-band handling. Fixed epoll_reactor::start_op so
that it is now exactly the same as the older, working version.

Text files modified:
   trunk/boost/asio/detail/impl/epoll_reactor.ipp | 15 +++++++--------
   1 files changed, 7 insertions(+), 8 deletions(-)

Modified: trunk/boost/asio/detail/impl/epoll_reactor.ipp
==============================================================================
--- trunk/boost/asio/detail/impl/epoll_reactor.ipp (original)
+++ trunk/boost/asio/detail/impl/epoll_reactor.ipp 2012-05-26 18:22:46 EDT (Sat, 26 May 2012)
@@ -222,16 +222,15 @@
 
   if (descriptor_data->op_queue_[op_type].empty())
   {
- if (allow_speculative)
+ if (allow_speculative
+ && (op_type != read_op
+ || descriptor_data->op_queue_[except_op].empty()))
     {
- if (op_type != read_op || descriptor_data->op_queue_[except_op].empty())
+ if (op->perform())
       {
- if (op->perform())
- {
- descriptor_lock.unlock();
- io_service_.post_immediate_completion(op);
- return;
- }
+ descriptor_lock.unlock();
+ io_service_.post_immediate_completion(op);
+ return;
       }
     }
     else


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