How to Prevent Race Conditions in Kotlin Coroutines
Автор: Dave Leeds
Загружено: 2025-11-24
Просмотров: 5033
Kotlin's coroutines don't automatically prevent race conditions - it's up to the developer to deal with them! The good news is that Kotlin gives us several tools to choose from, including atomics, confinement, mutexes, and more. In this video, we'll take a look at all of them, and when you might want to use each one.
📝 Corresponding article:
https://typealias.com/articles/preven...
🚀 Newsletter: https://newsletter.typealias.com/
🎉 Coroutines course: https://courses.typealias.com/coroutines
✨ New to Kotlin? Start your journey here: https://typealias.com/start/
🎞️ Chapters in this video
00:00 - Race Conditions in Coroutines
01:18 - Atomics
02:17 - StateFlow
03:03 - Mutex (Mutual Exclusion)
04:20 - Confinement with limitedParallelism
05:35 - Confinement with Actors
07:29 - Avoiding Shared Mutable State
08:17 - Summary of Options
Доступные форматы для скачивания:
Скачать видео mp4
-
Информация по загрузке: