Dico
09/16/2019, 9:15 AMSendChannel.offer
throws instead of returning false
?
If so, why is there not an equivalent that never throws?Vsevolod Tolstopyatov [JB]
09/16/2019, 5:34 PMsend
. We are thinking of changing that in #974If so, why is there not an equivalent that never throws?Unfortunately, no, because we have a compiler problems related to inline classes. You can write your own extension with an optimistic
isClosedForSend
check + try { ... } catch { ... }