Mark09/16/2019, 8:33 AM
"kotlinx.coroutines.channels.ClosedSendChannelException: Channel was closed"
(note: I’m using
to build the channel). I’ve isolated the cause to be this upgrade. I couldn’t find anything relevant in the release notes: https://github.com/Kotlin/kotlinx.coroutines/releases . Any tips on how to investigate what could be causing this, please?
octylFractal09/16/2019, 8:35 AM
louiscad09/16/2019, 8:35 AM
Mark09/16/2019, 8:42 AM
because I have a reference to the channel (and I think there is no
). Does this mean instead I need to hold onto a reference of the
corresponding to the
instead (in order to cancel)?
octylFractal09/16/2019, 8:43 AM
Mark09/16/2019, 8:48 AM
fixed the problem. Is there a reference to this behavior change in the docs somewhere?
louiscad09/16/2019, 8:54 AM
octylFractal09/16/2019, 8:55 AM
is for the sending side, indicating it is done sending,
is for the receiving side.
should never be followed by a
, because the sender declared the channel to be closed (and similar for
Mark09/16/2019, 9:04 AM
from the receiver. I was actually calling it from a class managing the channels (when the channel becomes obsolete due to external conditions). So now I know
is the correct way 🙏 But yes, a thorough reading of the docs is probably a wise investment of time!
Dico09/16/2019, 9:12 AM
Mark09/16/2019, 9:18 AM
Vsevolod Tolstopyatov [JB]09/16/2019, 5:37 PM