Kotlin coroutines have revolutionized JVM development, especially on Android and the backend, as they let us easily implement efficient and reliable multithreading. Their cutting-edge design and features are ideally suited to modern use cases. In this book, we explore how Kotlin coroutines work and how we can use them to improve our applications – using both the built-in support and the kotlinx.coroutines library.
About the book
This is a practical book. It shows everything with examples and focuses on real-life use cases. As this technology is already widely used on Android and backend applications, we will see how we can use it there and what the best practices are.
Who this book is for
This book is for Kotlin developers who want to understand Kotlin Coroutines and learn to use them in real-life projects in accordance with best practices. The book focuses on backend and Android use cases, but it also presents knowledge that can be used on other platforms.
What is covered
This book focuses on Kotlin Coroutines' features, including:
how suspend function works,
starting, awaiting, and cancelling coroutines,
basic and custom coroutine contexts,
dispatchers,
how structured concurrency works,
exceptions handling with coroutines,
testing coroutines,
starting scope,
best practices for using coroutines in modern projects,
using channels and flow,
flow processing functions,
testing flow,
best practices for using flow in modern projects,
review of the essential use cases for Kotlin Coroutines.
Informacja dotycząca wprowadzenia produktu do obrotu:
Ten produkt został wprowadzony na rynek przed 13 grudnia 2024 r. zgodnie z obowiązującymi wówczas przepisami (Dyrektywą o ogólnym bezpieczeństwie produktów). W związku z tym może on być nadal sprzedawany bez konieczności dostosowania do nowych wymogów wynikających z Rozporządzenia o Ogólnym Bezpieczeństwie Produktów (GPSR). Produkt zachowuje pełną legalność w obrocie, a jego jakość i bezpieczeństwo pozostają zgodne z obowiązującymi wcześniej standardami.
Information regarding product placement on the market:
This product was placed on the market before December 13, 2024, in accordance with the applicable regulations at the time (the General Product Safety Directive). As a result, it can continue to be sold without needing to meet the new requirements introduced by the General Product Safety Regulation (GPSR). The product remains fully compliant with all previously valid legal standards, ensuring its continued quality and safety.