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 use of GlobalScope is well-known to be a code smell in most cases - it's documented in the kdoc itself, as well as numerous articles and discussions around the Kotlin community.
However, in the official coroutines guide, the very first example of coroutines code, and the first example of such code most people will probably see from an "official" source, uses GlobalScope. I think this is counterproductive to all the other recommendations and warnings, and sets many people's first impressions of it as something that is ok to use as a default, and not only as a last resort.
I think the guide would do a better job of getting people off to the right start if the early examples, at least, didn't use GlobalScope.
The text was updated successfully, but these errors were encountered:
…hout it
Also, remove the tutorial variant of the basic coroutine introduction as it essentially duplicates the content of the
basic coroutine introduction, albeit with "how to create a project" additional information, which does not seem to be appropriate in this section at all.
Fixes#2122
…hout it (Kotlin#2637)
Also, remove the tutorial variant of the basic coroutine introduction as it essentially duplicates the content of the
basic coroutine introduction, albeit with "how to create a project" additional information, which does not seem to be appropriate in this section at all.
FixesKotlin#2122
Co-authored-by: Vsevolod Tolstopyatov <[email protected]>
Co-authored-by: Andrey Polyakov <[email protected]>
The use of
GlobalScope
is well-known to be a code smell in most cases - it's documented in the kdoc itself, as well as numerous articles and discussions around the Kotlin community.However, in the official coroutines guide, the very first example of coroutines code, and the first example of such code most people will probably see from an "official" source, uses
GlobalScope
. I think this is counterproductive to all the other recommendations and warnings, and sets many people's first impressions of it as something that is ok to use as a default, and not only as a last resort.I think the guide would do a better job of getting people off to the right start if the early examples, at least, didn't use
GlobalScope
.The text was updated successfully, but these errors were encountered: