Skip to content

Commit

Permalink
Remove faulty assertions from experimental::coro implementation.
Browse files Browse the repository at this point in the history
  • Loading branch information
chriskohlhoff committed Jul 31, 2022
1 parent 736a3a2 commit d3b79bf
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions asio/include/asio/experimental/impl/coro.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1011,7 +1011,6 @@ struct coro<Yield, Return, Executor>::initiate_async_resume

auto ch = detail::coroutine_handle<promise_type>::from_promise(*coro);
assert(ch && !ch.done());
assert(coro->awaited_from == detail::noop_coroutine());

coro->awaited_from = post_coroutine(std::move(exec), std::move(h));
coro->reset_error();
Expand All @@ -1033,7 +1032,6 @@ struct coro<Yield, Return, Executor>::initiate_async_resume

auto ch = detail::coroutine_handle<promise_type>::from_promise(*coro);
assert(ch && !ch.done());
assert(coro->awaited_from == detail::noop_coroutine());

coro->awaited_from = detail::post_coroutine(exec,
[coro, h = std::move(h)]() mutable
Expand Down Expand Up @@ -1083,7 +1081,6 @@ struct coro<Yield, Return, Executor>::initiate_async_resume
}
else
{
assert(coro->awaited_from == detail::noop_coroutine());
coro->awaited_from =
detail::post_coroutine(exec,
[coro, h = std::move(h)]() mutable
Expand Down Expand Up @@ -1135,7 +1132,6 @@ struct coro<Yield, Return, Executor>::initiate_async_resume
}
else
{
assert(coro->awaited_from == detail::noop_coroutine());
coro->awaited_from =
detail::post_coroutine(exec,
[h = std::move(h), coro]() mutable
Expand Down

0 comments on commit d3b79bf

Please sign in to comment.