mirror of
https://github.com/boostorg/beast.git
synced 2025-08-03 23:04:35 +02:00
@@ -2,6 +2,7 @@ Version 209:
|
|||||||
|
|
||||||
* Faster http::string_to_field
|
* Faster http::string_to_field
|
||||||
* async_echo supports move-only handlers
|
* async_echo supports move-only handlers
|
||||||
|
* test::stream maintains a handler work guard
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
@@ -450,13 +450,16 @@ TeardownHandler&& handler)
|
|||||||
template<class Handler, class Buffers>
|
template<class Handler, class Buffers>
|
||||||
class stream::read_op : public stream::read_op_base
|
class stream::read_op : public stream::read_op_base
|
||||||
{
|
{
|
||||||
|
using ex1_type = net::io_context::executor_type;
|
||||||
|
using ex2_type = net::associated_executor_t<Handler, ex1_type>;
|
||||||
|
|
||||||
class lambda
|
class lambda
|
||||||
{
|
{
|
||||||
state& s_;
|
state& s_;
|
||||||
Buffers b_;
|
Buffers b_;
|
||||||
Handler h_;
|
Handler h_;
|
||||||
net::executor_work_guard<
|
net::executor_work_guard<ex1_type> wg1_;
|
||||||
net::io_context::executor_type> work_;
|
net::executor_work_guard<ex2_type> wg2_;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
lambda(lambda&&) = default;
|
lambda(lambda&&) = default;
|
||||||
@@ -467,7 +470,9 @@ class stream::read_op : public stream::read_op_base
|
|||||||
: s_(s)
|
: s_(s)
|
||||||
, b_(b)
|
, b_(b)
|
||||||
, h_(std::forward<DeducedHandler>(h))
|
, h_(std::forward<DeducedHandler>(h))
|
||||||
, work_(s_.ioc.get_executor())
|
, wg1_(s_.ioc.get_executor())
|
||||||
|
, wg2_(net::get_associated_executor(
|
||||||
|
h_, s_.ioc.get_executor()))
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -477,7 +482,8 @@ class stream::read_op : public stream::read_op_base
|
|||||||
net::post(
|
net::post(
|
||||||
s_.ioc.get_executor(),
|
s_.ioc.get_executor(),
|
||||||
std::move(*this));
|
std::move(*this));
|
||||||
work_.reset();
|
wg1_.reset();
|
||||||
|
wg2_.reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
Reference in New Issue
Block a user