Use bind_front_handler:

The implementation uses bind_front_handler to reduce the
resources consumed when instantiating templates during
compilation.
This commit is contained in:
Vinnie Falco committed 2018-11-21 12:47:38 -08:00
1 parent d581bcc348
commit 15dd535c24
12 files changed
+29 -25

No files matched your search

+4 -4
View File
@@ -7,8 +7,8 @@
// Official repository: https://github.com/boostorg/beast
//
#ifndef BOOST_BEAST_HTTP_IMPL_READ_IPP_HPP
#define BOOST_BEAST_HTTP_IMPL_READ_IPP_HPP
#ifndef BOOST_BEAST_HTTP_IMPL_READ_IPP
#define BOOST_BEAST_HTTP_IMPL_READ_IPP
#include <boost/beast/http/type_traits.hpp>
#include <boost/beast/http/error.hpp>
@@ -182,7 +182,7 @@ operator()(
BOOST_ASIO_CORO_YIELD
boost::asio::post(
s_.get_executor(),
bind_handler(std::move(*this),
bind_front_handler(std::move(*this),
ec, bytes_transferred_));
}
h_(ec, bytes_transferred_);
@@ -305,7 +305,7 @@ operator()(
{
BOOST_ASIO_CORO_YIELD
boost::asio::post(s_.get_executor(),
bind_handler(std::move(*this), ec));
bind_front_handler(std::move(*this), ec));
goto upcall;
}
for(;;)
+2 -2
View File
@@ -147,7 +147,7 @@ operator()()
BOOST_ASSERT(! f.invoked);
return boost::asio::post(
s_.get_executor(),
bind_handler(std::move(*this), ec, 0));
bind_front_handler(std::move(*this), ec, 0));
}
if(f.invoked)
{
@@ -160,7 +160,7 @@ operator()()
}
return boost::asio::post(
s_.get_executor(),
bind_handler(std::move(*this), ec, 0));
bind_front_handler(std::move(*this), ec, 0));
}
template<