Tidy up calls to post()

This commit is contained in:
Vinnie Falco committed 2018-03-04 13:19:17 -08:00
1 parent 2fd3e46b20
commit 5eaa2be85e
11 files changed
+37 -50

No files matched your search

+5 -8
View File
@@ -152,8 +152,7 @@ operator()(
// Resume
BOOST_ASIO_CORO_YIELD
boost::asio::post(
d.ws.get_executor(), std::move(*this));
boost::asio::post(std::move(*this));
BOOST_ASSERT(d.ws.wr_block_.is_locked(this));
// Make sure the stream is open
@@ -196,8 +195,7 @@ operator()(
// Resume
BOOST_ASIO_CORO_YIELD
boost::asio::post(
d.ws.get_executor(), std::move(*this));
boost::asio::post(std::move(*this));
BOOST_ASSERT(d.ws.rd_block_.is_locked(this));
// Make sure the stream is open
@@ -303,10 +301,9 @@ operator()(
d.ws.paused_wr_.maybe_invoke();
if(! d.cont)
{
auto& ws = d.ws;
return boost::asio::post(
ws.stream_.get_executor(),
bind_handler(d_.release_handler(), ec));
BOOST_ASIO_CORO_YIELD
boost::asio::post(
bind_handler(std::move(*this), ec));
}
d_.invoke(ec);
}