These methods combine two operations: send/recv and check whether the channel is closed. try_recv in particular does not do what you would expect - recv or return immediately if no message is available.
No expressiveness would be lost by making the is_closed check its own method, though it may be slightly less efficient.
Nominating.
These methods combine two operations: send/recv and check whether the channel is closed.
try_recvin particular does not do what you would expect - recv or return immediately if no message is available.No expressiveness would be lost by making the
is_closedcheck its own method, though it may be slightly less efficient.Nominating.