The only case when impl.send_state_ becomes waiter seems to be that an async_receive is awaiting on an empty channel, as found in channel_service.hpp:557. As an empty channel, when no one is awaiting on it, whether send_state_ is buffer or block should solely depend on whether the channel itself is buffered or not.
The only case when
impl.send_state_
becomeswaiter
seems to be that anasync_receive
is awaiting on an empty channel, as found in channel_service.hpp:557. As an empty channel, when no one is awaiting on it, whethersend_state_
isbuffer
orblock
should solely depend on whether the channel itself is buffered or not.Fixes https://github.com/chriskohlhoff/asio/issues/1241