Closed saltatory closed 1 month ago
Quick update: the same logic refactored to use try_recv()
works fine.
Can you please provide more information? We have a fair number of tests on this:
If you're able to provide an example that displays the bug, then that would be very helpful.
Closing as duplicate of #6602. Thank you for reporting this bug.
Version
Platform
Issue
TL;DR:
tokio:::sync::mpsc::bounded::Receiver<T>::is_empty()
returns false but when immediately followed bytokio::sync::mpsc::bounded::Receiver<T>::recv()
therecv()
blocks.I have a message-oriented IO library that is communicating with
io-uring
. Before I attempt to recv() IO messages on my channel, I check that bothio-uring
submission queue is not full and thatReceiver
is not empty before callingrecv().await
. Theis_empty()
call returns false but therecv()
blocks.