Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r74953 - in trunk/boost/asio/detail: . impl
From: chris_at_[hidden]
Date: 2011-10-15 19:55:25


Author: chris_kohlhoff
Date: 2011-10-15 19:55:24 EDT (Sat, 15 Oct 2011)
New Revision: 74953
URL: http://svn.boost.org/trac/boost/changeset/74953

Log:
Construct interrupter member first to fix exception safety issue. Refs #6006

Text files modified:
   trunk/boost/asio/detail/epoll_reactor.hpp | 6 +++---
   trunk/boost/asio/detail/impl/epoll_reactor.ipp | 2 +-
   2 files changed, 4 insertions(+), 4 deletions(-)

Modified: trunk/boost/asio/detail/epoll_reactor.hpp
==============================================================================
--- trunk/boost/asio/detail/epoll_reactor.hpp (original)
+++ trunk/boost/asio/detail/epoll_reactor.hpp 2011-10-15 19:55:24 EDT (Sat, 15 Oct 2011)
@@ -205,15 +205,15 @@
   // Mutex to protect access to internal data.
   mutex mutex_;
 
+ // The interrupter is used to break a blocking epoll_wait call.
+ select_interrupter interrupter_;
+
   // The epoll file descriptor.
   int epoll_fd_;
 
   // The timer file descriptor.
   int timer_fd_;
 
- // The interrupter is used to break a blocking epoll_wait call.
- select_interrupter interrupter_;
-
   // The timer queues.
   timer_queue_set timer_queues_;
 

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 2011-10-15 19:55:24 EDT (Sat, 15 Oct 2011)
@@ -39,9 +39,9 @@
   : boost::asio::detail::service_base<epoll_reactor>(io_service),
     io_service_(use_service<io_service_impl>(io_service)),
     mutex_(),
+ interrupter_(),
     epoll_fd_(do_epoll_create()),
     timer_fd_(do_timerfd_create()),
- interrupter_(),
     shutdown_(false)
 {
   // Add the interrupter's descriptor to epoll.


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