Deep Dive
Marcin Moskala

#Kotlin
#Coroutines
#SharedFlow
#StateFlow
Kotlin coroutines revolutionized JVM development, especially on Android and the backend. They let us easily make efficient and reliable multithreading. Its cutting-edge design and features are suited ideally for modern use cases. In this book, we will explore Kotlin coroutines - both built-in support and kotlinx.coroutines library.
Table of Contents
Part 1: Understanding Kotlin Coroutines
Why Kotlin Coroutines?
Sequence builder
How does suspension work?
Coroutines under the hood
Coroutines: built-in support vs library
Part 2: Kotlin Coroutines library
Starting coroutines
The bigger picture
Coroutine context
Dispatchers
Job and coroutine lifecycle
Cancellation
Exception handling
Constructing a coroutine scope
Synchronizing access to mutable state
Testing Kotlin Coroutines
Part 3: Channel and Flow
Channel
Select
Hot and cold data sources
Flow introduction
Understanding Flow
Flow building
Flow lifecycle functions
Flow processing
Shared Flow and StateFlow
Testing flow
Part 4: Kotlin Coroutines in practice
Common use cases
Using coroutines from other languages
Launching coroutines vs. suspending functions
Best practices
The End
Exercise solutions
About the Author
Marcin Moskała is an experienced Android developer, teacher, and official Jetbrains' Kotlin training partner.
He is the founder of Kt. Academy, author of the books Android Development with Kotlin, Kotlin Essentials, Advanced Kotlin, Functional Kotlin, Effective Kotlin and Kotlin Coroutines. Deep dive. He is also an active programming community member, the main author of the most significant medium publication about Kotlin, and a speaker invited to programming conferences.









