Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r85763 - trunk/boost/asio/detail
From: chris_at_[hidden]
Date: 2013-09-17 18:14:14


Author: chris_kohlhoff
Date: 2013-09-17 18:14:14 EDT (Tue, 17 Sep 2013)
New Revision: 85763
URL: http://svn.boost.org/trac/boost/changeset/85763

Log:
Eliminate some unnecessary handler copies.

Text files modified:
   trunk/boost/asio/detail/reactive_socket_service_base.hpp | 12 ++++++------
   trunk/boost/asio/detail/win_iocp_socket_service_base.hpp | 12 ++++++------
   trunk/boost/asio/detail/win_object_handle_service.hpp | 2 +-
   3 files changed, 13 insertions(+), 13 deletions(-)

Modified: trunk/boost/asio/detail/reactive_socket_service_base.hpp
==============================================================================
--- trunk/boost/asio/detail/reactive_socket_service_base.hpp Tue Sep 17 18:12:07 2013 (r85762)
+++ trunk/boost/asio/detail/reactive_socket_service_base.hpp 2013-09-17 18:14:14 EDT (Tue, 17 Sep 2013) (r85763)
@@ -198,7 +198,7 @@
   template <typename ConstBufferSequence, typename Handler>
   void async_send(base_implementation_type& impl,
       const ConstBufferSequence& buffers,
- socket_base::message_flags flags, Handler handler)
+ socket_base::message_flags flags, Handler& handler)
   {
     bool is_continuation =
       boost_asio_handler_cont_helpers::is_continuation(handler);
@@ -222,7 +222,7 @@
   // Start an asynchronous wait until data can be sent without blocking.
   template <typename Handler>
   void async_send(base_implementation_type& impl, const null_buffers&,
- socket_base::message_flags, Handler handler)
+ socket_base::message_flags, Handler& handler)
   {
     bool is_continuation =
       boost_asio_handler_cont_helpers::is_continuation(handler);
@@ -269,7 +269,7 @@
   template <typename MutableBufferSequence, typename Handler>
   void async_receive(base_implementation_type& impl,
       const MutableBufferSequence& buffers,
- socket_base::message_flags flags, Handler handler)
+ socket_base::message_flags flags, Handler& handler)
   {
     bool is_continuation =
       boost_asio_handler_cont_helpers::is_continuation(handler);
@@ -297,7 +297,7 @@
   // Wait until data can be received without blocking.
   template <typename Handler>
   void async_receive(base_implementation_type& impl, const null_buffers&,
- socket_base::message_flags flags, Handler handler)
+ socket_base::message_flags flags, Handler& handler)
   {
     bool is_continuation =
       boost_asio_handler_cont_helpers::is_continuation(handler);
@@ -354,7 +354,7 @@
   template <typename MutableBufferSequence, typename Handler>
   void async_receive_with_flags(base_implementation_type& impl,
       const MutableBufferSequence& buffers, socket_base::message_flags in_flags,
- socket_base::message_flags& out_flags, Handler handler)
+ socket_base::message_flags& out_flags, Handler& handler)
   {
     bool is_continuation =
       boost_asio_handler_cont_helpers::is_continuation(handler);
@@ -381,7 +381,7 @@
   template <typename Handler>
   void async_receive_with_flags(base_implementation_type& impl,
       const null_buffers&, socket_base::message_flags in_flags,
- socket_base::message_flags& out_flags, Handler handler)
+ socket_base::message_flags& out_flags, Handler& handler)
   {
     bool is_continuation =
       boost_asio_handler_cont_helpers::is_continuation(handler);

Modified: trunk/boost/asio/detail/win_iocp_socket_service_base.hpp
==============================================================================
--- trunk/boost/asio/detail/win_iocp_socket_service_base.hpp Tue Sep 17 18:12:07 2013 (r85762)
+++ trunk/boost/asio/detail/win_iocp_socket_service_base.hpp 2013-09-17 18:14:14 EDT (Tue, 17 Sep 2013) (r85763)
@@ -215,7 +215,7 @@
   template <typename ConstBufferSequence, typename Handler>
   void async_send(base_implementation_type& impl,
       const ConstBufferSequence& buffers,
- socket_base::message_flags flags, Handler handler)
+ socket_base::message_flags flags, Handler& handler)
   {
     // Allocate and construct an operation to wrap the handler.
     typedef win_iocp_socket_send_op<ConstBufferSequence, Handler> op;
@@ -238,7 +238,7 @@
   // Start an asynchronous wait until data can be sent without blocking.
   template <typename Handler>
   void async_send(base_implementation_type& impl, const null_buffers&,
- socket_base::message_flags, Handler handler)
+ socket_base::message_flags, Handler& handler)
   {
     // Allocate and construct an operation to wrap the handler.
     typedef win_iocp_null_buffers_op<Handler> op;
@@ -282,7 +282,7 @@
   template <typename MutableBufferSequence, typename Handler>
   void async_receive(base_implementation_type& impl,
       const MutableBufferSequence& buffers,
- socket_base::message_flags flags, Handler handler)
+ socket_base::message_flags flags, Handler& handler)
   {
     // Allocate and construct an operation to wrap the handler.
     typedef win_iocp_socket_recv_op<MutableBufferSequence, Handler> op;
@@ -305,7 +305,7 @@
   // Wait until data can be received without blocking.
   template <typename Handler>
   void async_receive(base_implementation_type& impl, const null_buffers&,
- socket_base::message_flags flags, Handler handler)
+ socket_base::message_flags flags, Handler& handler)
   {
     // Allocate and construct an operation to wrap the handler.
     typedef win_iocp_null_buffers_op<Handler> op;
@@ -356,7 +356,7 @@
   template <typename MutableBufferSequence, typename Handler>
   void async_receive_with_flags(base_implementation_type& impl,
       const MutableBufferSequence& buffers, socket_base::message_flags in_flags,
- socket_base::message_flags& out_flags, Handler handler)
+ socket_base::message_flags& out_flags, Handler& handler)
   {
     // Allocate and construct an operation to wrap the handler.
     typedef win_iocp_socket_recvmsg_op<MutableBufferSequence, Handler> op;
@@ -379,7 +379,7 @@
   template <typename Handler>
   void async_receive_with_flags(base_implementation_type& impl,
       const null_buffers&, socket_base::message_flags in_flags,
- socket_base::message_flags& out_flags, Handler handler)
+ socket_base::message_flags& out_flags, Handler& handler)
   {
     // Allocate and construct an operation to wrap the handler.
     typedef win_iocp_null_buffers_op<Handler> op;

Modified: trunk/boost/asio/detail/win_object_handle_service.hpp
==============================================================================
--- trunk/boost/asio/detail/win_object_handle_service.hpp Tue Sep 17 18:12:07 2013 (r85762)
+++ trunk/boost/asio/detail/win_object_handle_service.hpp 2013-09-17 18:14:14 EDT (Tue, 17 Sep 2013) (r85763)
@@ -130,7 +130,7 @@
 
   /// Start an asynchronous wait.
   template <typename Handler>
- void async_wait(implementation_type& impl, Handler handler)
+ void async_wait(implementation_type& impl, Handler& handler)
   {
     // Allocate and construct an operation to wrap the handler.
     typedef wait_handler<Handler> op;


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