immediate_executor is supported. (#2672)

This commit is contained in:
Klemens Morgenstern authored and GitHub committed 2023-10-13 05:33:23 -03:00
1 parent 177a1222a6
commit dd875463ff
25 files changed
+475 -219

No files matched your search

+10 -7
View File
@@ -18,7 +18,7 @@
#include <boost/beast/core/stream_traits.hpp>
#include <boost/beast/core/detail/is_invocable.hpp>
#include <boost/asio/coroutine.hpp>
#include <boost/asio/post.hpp>
#include <boost/asio/dispatch.hpp>
#include <boost/asio/write.hpp>
#include <boost/optional.hpp>
#include <boost/throw_exception.hpp>
@@ -102,8 +102,9 @@ public:
__FILE__, __LINE__,
"http::async_write_some"));
return net::post(
s_.get_executor(),
auto ex = asio::get_associated_immediate_executor(*this, s_.get_executor());
return net::dispatch(
ex,
beast::bind_front_handler(
std::move(*this), ec, 0));
}
@@ -120,8 +121,9 @@ public:
__FILE__, __LINE__,
"http::async_write_some"));
return net::post(
s_.get_executor(),
const auto ex = this->get_immediate_executor();
return net::dispatch(
ex,
beast::bind_front_handler(
std::move(*this), ec, 0));
}
@@ -219,8 +221,9 @@ public:
__FILE__, __LINE__,
"http::async_write"));
net::post(
s_.get_executor(),
const auto ex = this->get_immediate_executor();
net::dispatch(
ex,
std::move(*this));
}
goto upcall;