You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The main difference between runBlocking and coroutineScope is that the latter does not block the current thread while waiting for all children to complete.
but the code example below that quote, doesn't show the mentioned difference, because "Coroutine scope is over" is not printed until the nested launch completes so and the new readers might think it's blocking too and confuses them.
Consider this question in stackoverflow
and this one in discuss.kotlin
Changing that example that shows the suspending of the coroutineScope and blocking of runBlocking might help new readers.
The text was updated successfully, but these errors were encountered:
The code sample for the scope builder section of documentation confuses the new readers.
The problem is the documentation says
but the code example below that quote, doesn't show the mentioned difference, because "Coroutine scope is over" is not printed until the nested launch completes so and the new readers might think it's blocking too and confuses them.
Consider this question in stackoverflow
and this one in discuss.kotlin
Changing that example that shows the suspending of the coroutineScope and blocking of runBlocking might help new readers.
The text was updated successfully, but these errors were encountered: