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
Receiver::recv fails with a RecvError if the channel is disconnected, but Sender::send will just spin forever in that case with a future that is always pending. I'd like to have a send method that keeps trying if the channel is full but fails with a SendError if the channel disconnects. This could be a new method, something like Sender::send_if_connected.
The text was updated successfully, but these errors were encountered:
Instead of adding a new method (or perhaps in addition) it might be nice to change the behavior of the existing send method to finish immediately and drop messages if the channel is disconnected. It is already the case that messages could be added to the channel buffer and then dropped when the channel is disconnected, so send completing is no guarantee that messages will be received.
Receiver::recv
fails with aRecvError
if the channel is disconnected, butSender::send
will just spin forever in that case with a future that is always pending. I'd like to have a send method that keeps trying if the channel is full but fails with aSendError
if the channel disconnects. This could be a new method, something likeSender::send_if_connected
.The text was updated successfully, but these errors were encountered: