Загрузка...

How to Prevent Race Conditions in Kotlin Coroutines

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/prevent-race-conditions-in-coroutines/

🚀 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

Видео How to Prevent Race Conditions in Kotlin Coroutines канала Dave Leeds
Яндекс.Метрика
Все заметки Новая заметка Страницу в заметки
Страницу в закладки Мои закладки
На информационно-развлекательном портале SALDA.WS применяются cookie-файлы. Нажимая кнопку Принять, вы подтверждаете свое согласие на их использование.
О CookiesНапомнить позжеПринять