Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r63574 - trunk/boost/asio/detail/impl
From: chris_at_[hidden]
Date: 2010-07-04 03:23:28


Author: chris_kohlhoff
Date: 2010-07-04 03:23:27 EDT (Sun, 04 Jul 2010)
New Revision: 63574
URL: http://svn.boost.org/trac/boost/changeset/63574

Log:
Add cancellation of reactor operations.

Text files modified:
   trunk/boost/asio/detail/impl/win_iocp_socket_service_base.ipp | 10 ++++++++++
   1 files changed, 10 insertions(+), 0 deletions(-)

Modified: trunk/boost/asio/detail/impl/win_iocp_socket_service_base.ipp
==============================================================================
--- trunk/boost/asio/detail/impl/win_iocp_socket_service_base.ipp (original)
+++ trunk/boost/asio/detail/impl/win_iocp_socket_service_base.ipp 2010-07-04 03:23:27 EDT (Sun, 04 Jul 2010)
@@ -190,6 +190,16 @@
   }
 #endif // defined(BOOST_ASIO_ENABLE_CANCELIO)
 
+ // Cancel any operations started via the reactor.
+ if (!ec)
+ {
+ reactor* r = static_cast<reactor*>(
+ interlocked_compare_exchange_pointer(
+ reinterpret_cast<void**>(&reactor_), 0, 0));
+ if (r)
+ r->cancel_ops(impl.socket_, impl.reactor_data_);
+ }
+
   return ec;
 }
 


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