get it’s own coroutineScope or inherit it from whoever is calling the function?
m
mkrussel
10/26/2022, 1:27 PM
It gets its own
CoroutineContext
.
s
streetsofboston
10/26/2022, 1:28 PM
Yes; it's in the same scope.
Cancelling out of a withContext() block will cancel the calling coroutineScope (depending on the type of Job its context has) and cancelling the calling coroutineScope will cancel any suspended code within the withContext() block.