forked from boostorg/beast
immediate_executor is supported. (#2672)
This commit is contained in:
1 parent
177a1222a6
commit
dd875463ff
25 files changed
+475
-219
No files matched your search
@@ -23,7 +23,6 @@
|
||||
#include <boost/beast/core/detail/buffer.hpp>
|
||||
#include <boost/beast/version.hpp>
|
||||
#include <boost/asio/coroutine.hpp>
|
||||
#include <boost/asio/post.hpp>
|
||||
#include <boost/assert.hpp>
|
||||
#include <boost/throw_exception.hpp>
|
||||
#include <memory>
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
#include <boost/beast/core/stream_traits.hpp>
|
||||
#include <boost/beast/core/detail/bind_continuation.hpp>
|
||||
#include <boost/asio/coroutine.hpp>
|
||||
#include <boost/asio/post.hpp>
|
||||
#include <boost/asio/dispatch.hpp>
|
||||
#include <boost/throw_exception.hpp>
|
||||
#include <memory>
|
||||
|
||||
@@ -106,7 +106,8 @@ public:
|
||||
__FILE__, __LINE__,
|
||||
"websocket::async_close"));
|
||||
|
||||
net::post(sp->stream().get_executor(), std::move(*this));
|
||||
const auto ex = this->get_immediate_executor();
|
||||
net::dispatch(ex, std::move(*this));
|
||||
}
|
||||
BOOST_ASSERT(impl.wr_block.is_locked(this));
|
||||
}
|
||||
@@ -167,7 +168,8 @@ public:
|
||||
__FILE__, __LINE__,
|
||||
"websocket::async_close"));
|
||||
|
||||
net::post(sp->stream().get_executor(), std::move(*this));
|
||||
const auto ex = this->get_immediate_executor();
|
||||
net::dispatch(ex, std::move(*this));
|
||||
}
|
||||
BOOST_ASSERT(impl.rd_block.is_locked(this));
|
||||
if(impl.check_stop_now(ec))
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
#include <boost/beast/websocket/detail/frame.hpp>
|
||||
#include <boost/beast/websocket/impl/stream_impl.hpp>
|
||||
#include <boost/asio/coroutine.hpp>
|
||||
#include <boost/asio/dispatch.hpp>
|
||||
#include <boost/asio/post.hpp>
|
||||
#include <boost/throw_exception.hpp>
|
||||
#include <memory>
|
||||
@@ -99,7 +100,8 @@ public:
|
||||
__FILE__, __LINE__,
|
||||
"websocket::async_ping"));
|
||||
|
||||
net::post(sp->stream().get_executor(), std::move(*this));
|
||||
const auto ex = this->get_immediate_executor();
|
||||
net::dispatch(ex, std::move(*this));
|
||||
}
|
||||
BOOST_ASSERT(impl.wr_block.is_locked(this));
|
||||
}
|
||||
|
||||
@@ -26,7 +26,6 @@
|
||||
#include <boost/beast/core/detail/clamp.hpp>
|
||||
#include <boost/beast/core/detail/config.hpp>
|
||||
#include <boost/asio/coroutine.hpp>
|
||||
#include <boost/asio/post.hpp>
|
||||
#include <boost/assert.hpp>
|
||||
#include <boost/config.hpp>
|
||||
#include <boost/optional.hpp>
|
||||
@@ -122,7 +121,8 @@ public:
|
||||
__FILE__, __LINE__,
|
||||
"websocket::async_read_some"));
|
||||
|
||||
net::post(sp->stream().get_executor(), std::move(*this));
|
||||
const auto ex = this->get_immediate_executor();
|
||||
net::dispatch(ex, std::move(*this));
|
||||
}
|
||||
BOOST_ASSERT(impl.rd_block.is_locked(this));
|
||||
|
||||
@@ -238,7 +238,8 @@ public:
|
||||
__FILE__, __LINE__,
|
||||
"websocket::async_read_some"));
|
||||
|
||||
net::post(sp->stream().get_executor(), std::move(*this));
|
||||
const auto ex = this->get_immediate_executor();
|
||||
net::dispatch(ex, std::move(*this));
|
||||
}
|
||||
BOOST_ASSERT(cont);
|
||||
// VFALCO call check_stop_now() here?
|
||||
@@ -291,7 +292,8 @@ public:
|
||||
__FILE__, __LINE__,
|
||||
"websocket::async_read_some"));
|
||||
|
||||
net::post(sp->stream().get_executor(), std::move(*this));
|
||||
const auto ex = this->get_immediate_executor();
|
||||
net::dispatch(ex, std::move(*this));
|
||||
}
|
||||
BOOST_ASSERT(impl.wr_block.is_locked(this));
|
||||
if(impl.check_stop_now(ec))
|
||||
@@ -335,7 +337,8 @@ public:
|
||||
__FILE__, __LINE__,
|
||||
"websocket::async_read_some"));
|
||||
|
||||
net::post(sp->stream().get_executor(), std::move(*this));
|
||||
const auto ex = this->get_immediate_executor();
|
||||
net::dispatch(ex, std::move(*this));
|
||||
}
|
||||
BOOST_ASSERT(cont);
|
||||
}
|
||||
@@ -366,7 +369,8 @@ public:
|
||||
__FILE__, __LINE__,
|
||||
"websocket::async_read_some"));
|
||||
|
||||
net::post(sp->stream().get_executor(), std::move(*this));
|
||||
const auto ex = this->get_immediate_executor();
|
||||
net::dispatch(ex, std::move(*this));
|
||||
}
|
||||
BOOST_ASSERT(cont);
|
||||
}
|
||||
@@ -648,7 +652,8 @@ public:
|
||||
__FILE__, __LINE__,
|
||||
"websocket::async_read_some"));
|
||||
|
||||
net::post(sp->stream().get_executor(), std::move(*this));
|
||||
const auto ex = this->get_immediate_executor();
|
||||
net::dispatch(ex, std::move(*this));
|
||||
}
|
||||
BOOST_ASSERT(impl.wr_block.is_locked(this));
|
||||
if(impl.check_stop_now(ec))
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
#include <boost/beast/core/detail/bind_continuation.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 <memory>
|
||||
|
||||
namespace boost {
|
||||
@@ -128,7 +128,8 @@ public:
|
||||
"websocket::tcp::async_teardown"
|
||||
));
|
||||
|
||||
net::post(s_.get_executor(), bind_front_handler(
|
||||
const auto ex = this->get_immediate_executor();
|
||||
net::dispatch(ex, bind_front_handler(
|
||||
std::move(*this), ec));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -199,7 +199,8 @@ operator()(
|
||||
"websocket::async_write_some"
|
||||
));
|
||||
|
||||
net::post(sp->stream().get_executor(), std::move(*this));
|
||||
const auto ex = this->get_immediate_executor();
|
||||
net::dispatch(ex, std::move(*this));
|
||||
}
|
||||
BOOST_ASSERT(impl.wr_block.is_locked(this));
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user