That’s it! You’ve just implemented your first coroutine. You’ve learned:
How to start a coroutine in an Android application.
The difference between the runBlocking and the launch coroutine builders and between blocking and suspending code execution.
How to cancel coroutines. Remember that a coroutine cancellation consists of throwing an exception. You must not catch the exception without re-throwing it later, because the coroutine in question could keep running indefinitely.
In the next lesson, you’ll learn about coroutine scopes and dispatchers.
See forum comments
This content was released on Jun 5 2024. The official support period is 6-months
from this date.
Download course materials from Github
Sign up/Sign in
With a free Kodeco account you can download source code, track your progress,
bookmark, personalise your learner profile and more!
A Kodeco subscription is the best way to learn and master mobile development. Learn iOS, Swift, Android, Kotlin, Flutter and Dart development and unlock our massive catalog of 50+ books and 4,000+ videos.