You can use `coroutineScope` in your function body...
# coroutines
z
You can use
coroutineScope
in your function body so the caller doesn’t need to pass one in, and it t would be more idiomatic to use
launch
instead of
async
since the timing coroutine doesn’t need to return a value.
👌 1
🧵 5
a
ah, interesting. So coroutineScope is essentially a handy function to “create or reuse existing coroutine scope”?
…and a suspend function in and of itself might not have a coroutine scope, so I guess it makes the function more ergonomic
z
coroutineScope
has pretty good docs, but yea it creates a "child" coroutine and waits for it to finish (including any coroutines that it launches)
🙌 1