Hey :wave: If I’m using SuspendApp (launched on D...
# arrow
r
Hey 👋 If I’m using SuspendApp (launched on Dispatchers.Default), if I launch another coroutine on Dispatchers.IO within the same scope, will that new coroutine be gracefully shutdown by SuspendApp too? I’m assuming it doesn’t matter which dispatcher you launch within the suspend app, the gracefully shutdown is the same for all child coroutines?
s
Hey @Richard Prince, Yes, if you launch a coroutine it will inherit the parent of
SuspendApp
. Well, it needs to some be launched on the
CoroutineScope
of the lambda of
SuspendApp
.
block: suspend CoroutineScope.() -> Unit
. Dispatchers are do not affect structured concurrency.
r
Thanks Simon 🙂
s
My pleasure ☺️