Slackbot
06/18/2020, 2:41 PMlouiscad
06/18/2020, 2:45 PMcoroutineScope { ... }
.allan.conda
06/18/2020, 2:48 PMlouiscad
06/18/2020, 2:50 PMsuspend fun someBatchUpload(): List<Int> = coroutineScope {
listOf(async { 1 }, async { 2 }).awaitAll()
}
allan.conda
06/18/2020, 2:58 PMI don’t really understand what you mean, but basically, you need this instead of what you showed:Thanks, looks like I’m not making much sense 😄. Actually, I already came to the conclusion that I needed to use coroutineScope exactly like you wrote, because that’s the only one that didn’t throw a warning or error. But I don’t understand how it works and right now I just assume it does what I think it does; I’m not sure yet how to test scoped coroutine lifecycle so I can’t know for sure.