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

+12 -21
View File
@@ -196,8 +196,7 @@ operator()(
// Resume
BOOST_ASIO_CORO_YIELD
boost::asio::post(
ws_.get_executor(), std::move(*this));
boost::asio::post(std::move(*this));
BOOST_ASSERT(ws_.rd_block_.is_locked(this));
// The only way to get read blocked is if
@@ -278,9 +277,7 @@ operator()(
if(! cont_)
{
BOOST_ASIO_CORO_YIELD
boost::asio::post(
ws_.get_executor(),
std::move(*this));
boost::asio::post(std::move(*this));
BOOST_ASSERT(cont_);
}
}
@@ -322,8 +319,7 @@ operator()(
// Resume
BOOST_ASIO_CORO_YIELD
boost::asio::post(
ws_.get_executor(), std::move(*this));
boost::asio::post(std::move(*this));
BOOST_ASSERT(ws_.wr_block_.is_locked(this));
// Make sure the stream is open
@@ -354,9 +350,7 @@ operator()(
if(! cont_)
{
BOOST_ASIO_CORO_YIELD
boost::asio::post(
ws_.get_executor(),
std::move(*this));
boost::asio::post(std::move(*this));
BOOST_ASSERT(cont_);
}
}
@@ -380,9 +374,7 @@ operator()(
if(! cont_)
{
BOOST_ASIO_CORO_YIELD
boost::asio::post(
ws_.get_executor(),
std::move(*this));
boost::asio::post(std::move(*this));
BOOST_ASSERT(cont_);
}
}
@@ -638,8 +630,7 @@ operator()(
// Resume
BOOST_ASIO_CORO_YIELD
boost::asio::post(
ws_.get_executor(), std::move(*this));
boost::asio::post(std::move(*this));
BOOST_ASSERT(ws_.wr_block_.is_locked(this));
// Make sure the stream is open
@@ -700,10 +691,11 @@ operator()(
ws_.paused_ping_.maybe_invoke() ||
ws_.paused_wr_.maybe_invoke();
if(! cont_)
return boost::asio::post(
ws_.stream_.get_executor(),
bind_handler(std::move(h_),
ec, bytes_written_));
{
BOOST_ASIO_CORO_YIELD
boost::asio::post(
bind_handler(std::move(*this), ec));
}
h_(ec, bytes_written_);
}
}
@@ -814,9 +806,8 @@ operator()(
{
BOOST_ASIO_CORO_YIELD
boost::asio::post(
ws_.get_executor(),
bind_handler(std::move(*this),
error::buffer_overflow, 0));
error::buffer_overflow));
break;
}
BOOST_ASIO_CORO_YIELD