A Kotlin project I created in order to understand the concept of Kotlin's Coroutines.
Transforming a project from traditional blocking and sequential method calls to a suspending implementation embracing Coroutines and being able to delegate invocation of different methods into dedicated Threads. More precisely, the tangible goals were to understand:
- How to
launch
a Coroutine - How to make a function
suspending
- The difference between
launch { ... }
andasync { ... }
- How to leverage different
Threads
and even correspondingThread Pools
- How to switch between
blocking
andsuspending
contexts
$ ./gradlew run