David W
09/17/2020, 4:27 PMlaunch {
singletonReceiveChannel.consumeEach { printLine(it) }
}
will produce a memory leak due to consumeEach never getting canceled, even if `launch`'s CoroutineScope ends?Zach Klippenstein (he/him) [MOD]
09/17/2020, 5:29 PMDavid W
09/17/2020, 5:35 PMDavid W
09/17/2020, 5:36 PMconsumeEach stays suspended, it wouldn't be canceledbdawg.io
09/17/2020, 6:14 PMsuspend generally means that function becomes part of the caller's scope/structured concurrency (in this case, the launch 's scope)Zach Klippenstein (he/him) [MOD]
09/17/2020, 6:23 PMDavid W
09/17/2020, 6:27 PM