Kotlin Coroutines

DEEP DIVE

Kotlin coroutines revolutionized how we do JVM development, especially on Android and backend. They let us easily make efficient and reliable multithreading. Its cutting-edge design and feature are suited perfectly for modern use cases. In this book, we will explore Kotlin coroutines - both built-in support and kotlinx.coroutines library - how they work and how we can use them to make our programs better.

This is a practical book. It shows everything by examples and concentrates on real-life use cases. As this technology is already widely used on Android and backend applications, we will see how it can be used there and what the best practices are.

The purpose of this book

This book explains in-depth how coroutines work in Kotlin, explains the most important features of the kotlinx.coroutines library, and explains how they can be used in the common use cases.

For whom the book is written

This book is for Kotlin developers, who want to understand these new capabilities, and then learn how to use them to create reliable, testable, and efficient code.

This book assumes that you have enough knowledge and skills to do Kotlin development. If you don’t, I recommend starting from some resources designed for beginners.

How this book is organized

The book is divided into four parts:

  • Part 1: Understanding Kotlin Coroutines - a deep explanation of how coroutines work and what is the core idea behind it.
  • Part 2: Kotlin Coroutines library - dedicated to the most important elements and concepts in the kotlinx.coroutines library.
  • Part 3: Channel and Flow - focuses on two important functionalities: Channel and Flow.
  • Part 4: Big picture - gives a big picture of Kotlin coroutines development and shows the best practices for using coroutines in our applications.
Marcin Moskała

The Author

Marcin Moskała

Marcin Moskala is an experienced developer and Kotlin trainer. He is the founder of the Kt. Academy, an official JetBrains partner for Kotlin trainings, author of the books Effective Kotlin and Android Development with Kotlin. He is also the main author of the biggest medium publication about Kotlin and a speaker invited to many programming conferences.