robin
10/22/2018, 12:39 PMlaunch behave like a daemon inside its coroutine scope?
coroutineScope {
launch { /* do work */ }
launch { /* do work */ }
launch { while (true) /* Do sth until everything is done */ }
}
Instead of preventing the coroutine scope from exiting, I'd like that last launch to automatically be cancelled once all other coroutines in the scope complete. Is something like this possible without waiting for the other launches to join, and then cancelling the last job manually?