You are currently viewing coroutineScope clarification

coroutineScope clarification

Hello everyone, just wondering if someone can clarify the difference between having = coroutineScope added to a method (or not). e.g.

override suspend fun myMethod() = coroutineScope {



override suspend fun myMethod() {


The code works either way, but there must be some difference in the context of where the coroutine is running I guess?

Thanks in advance!

submitted by /u/Nycran
[link] [comments]