Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r76432 - trunk/boost/asio/detail/impl
From: chris_at_[hidden]
Date: 2012-01-12 08:38:18


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

Log:
Fix non-paged pool "leak" on Windows when io_service is repeatedly run without anything to do. Refs #6321.

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

Modified: trunk/boost/asio/detail/impl/win_iocp_io_service.ipp
==============================================================================
--- trunk/boost/asio/detail/impl/win_iocp_io_service.ipp (original)
+++ trunk/boost/asio/detail/impl/win_iocp_io_service.ipp 2012-01-12 08:38:17 EST (Thu, 12 Jan 2012)
@@ -148,7 +148,7 @@
 {
   if (::InterlockedExchangeAdd(&outstanding_work_, 0) == 0)
   {
- stop();
+ InterlockedExchange(&stopped_, 1);
     ec = boost::system::error_code();
     return 0;
   }
@@ -166,7 +166,7 @@
 {
   if (::InterlockedExchangeAdd(&outstanding_work_, 0) == 0)
   {
- stop();
+ InterlockedExchange(&stopped_, 1);
     ec = boost::system::error_code();
     return 0;
   }
@@ -180,7 +180,7 @@
 {
   if (::InterlockedExchangeAdd(&outstanding_work_, 0) == 0)
   {
- stop();
+ InterlockedExchange(&stopped_, 1);
     ec = boost::system::error_code();
     return 0;
   }
@@ -198,7 +198,7 @@
 {
   if (::InterlockedExchangeAdd(&outstanding_work_, 0) == 0)
   {
- stop();
+ InterlockedExchange(&stopped_, 1);
     ec = boost::system::error_code();
     return 0;
   }


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