You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a rendezvous channel with one Receiver and multiple senders, each sender sitting in its own task. I'd like these tasks to wake up when the Receiver gets dropped. For this to work, the task needs to suspend on SendSink::poll_ready.
Today, this does not work because SendFut returns Poll::Ready if it does not have anything to do:
I don't think this is correct. Instead of always returning Poll::Ready, I think the future needs to check, whether there would be capacity to send an item and if there isn't like in the case of a rendezvous channel, register a waker and return Poll::Pending.
The text was updated successfully, but these errors were encountered:
I have a rendezvous channel with one
Receiver
and multiple senders, each sender sitting in its own task. I'd like these tasks to wake up when theReceiver
gets dropped. For this to work, the task needs to suspend onSendSink::poll_ready
.Today, this does not work because
SendFut
returnsPoll::Ready
if it does not have anything to do:flume/src/async.rs
Lines 195 to 198 in fcf3849
I don't think this is correct. Instead of always returning
Poll::Ready
, I think the future needs to check, whether there would be capacity to send an item and if there isn't like in the case of a rendezvous channel, register a waker and returnPoll::Pending
.The text was updated successfully, but these errors were encountered: