is supposed to be launched in a supervisor scope to avoid cancelling its sibling coroutines when it fails, then it should be inside the
supervisorScope
lambda.
j
janvladimirmostert
07/05/2022, 11:19 AM
Each launch is triggered when a connection happens, so any exception being thrown inside one of these launches should not cancel the other launches being triggered by other connections.
Running launch inside supervisorScope sounds like the correct way, but the mental model I have of supervisorScope makes me think it'll work inside launch too.
j
Joffrey
07/05/2022, 12:25 PM
The scope's purpose is to control a set of coroutines. So all the launches that you want to "group" together should be launched in the same supervisor scope, otherwise there is no real point.