September 2019
Intermediate to advanced
462 pages
11h 3m
English
In Kotlin coroutines are first-class citizens. They’re built into the language, but the convenience functions to work with coroutines are part of a library. Coroutines offer some capabilities that aren’t possible with subroutines. They’re used in infinite sequences, event loops, and cooperating functions, for example. To learn about the benefits of coroutines, we’ll start with an example that runs sequentially and then change the code to run concurrently with coroutines.
When executing code, you can decide if the code should run sequentially or if it should run concurrently, either within the context of the current execution or as a separate coroutine. Let’s explore how we can configure these options.
Read now
Unlock full access