gbaldeck03/26/2021, 3:18 AM
Zach Klippenstein (he/him) [MOD]03/26/2021, 3:32 AM
creating its own root scope is a red flag. Defeats the purpose of calling it from a launched effect, breaks structured concurrency, introduces memory and other resource leaks. It should be a suspend function. And the coroutine started by launched effect is already running on the main dispatcher.
as the key since the caller could pass a different instance in at any time, and if they did then youd leak the launched coroutine from the last one.
gbaldeck03/26/2021, 5:03 AM
olonho03/26/2021, 7:41 AM
christophsturm03/26/2021, 11:34 AM
theapache6403/27/2021, 3:21 PM
gbaldeck03/27/2021, 4:09 PM