Join Slack
Powered by
If coroutine launched with start=LAZY and never ca...
# coroutines
p
PHondogo
05/15/2024, 3:03 PM
If coroutine launched with start=LAZY and never called start can it be just GCed or need explicitly be cancelled?
d
Dmitry Khalanskiy [JB]
05/15/2024, 5:51 PM
You should typically cancel it. Otherwise, the parent coroutine will wait for it, so this code hangs:
Copy code
coroutineScope { launch(start = CoroutineStart.LAZY) { } }
🙏 1
2
Views
Open in Slack
Previous
Next