This chapter is going to address various aspects of asynchronous programming problems. The first two recipes, Executing tasks in the background using threads and Background-threads synchronization, are going to explain the standard library support for running background tasks using JVM threads.
In the further recipes, we are going to delve more deeply into the powerful Kotlin Coroutines framework. Those recipes are going to explain a general usage of coroutines for asynchronous and concurrent tasks executing. They will also present how to employ coroutines for solving more specific daily-life programming problems, such as concurrent data processing, asynchronous REST-call handling, and working with third-party callback-style APIs in a clean way. After reading this chapter, you will feel convenient applying the coroutines framework to write robust asynchronous code...