ATOMICALLY { DELETE YOUR ACTORS }
summary
Claim: ZIO STM gives composable, atomic transactions across many mutable refs so transfers avoid race conditions, stale-cache reads and deadlocks. Concrete: semaphore implemented as one TRef with acquire/release in ~8 lines vs prior 301 lines and 11 months by seven contributors; promise as Option[T] in a TRef in ~10 minutes; a doubly back-pressured async queue in ~13 lines instead of ~500+ lines. STM auto-retries on conflicts, supports retry/fail/succeed semantics, and the code is landing on GitHub.
AI-written summary · about
chapters (8)
- 0:00Introduction
- 2:31The bank heist analogy
- 7:40Limitations of locks
- 9:55Limitations of actors
- 13:36Introducing ZIO STM
- 16:43ZIO STM API and features
- 24:36Implementing data structures
- 33:55Conclusion
related talks
01h 33mWhy You Should Use Software Transactional Memory
01h 00mWhat did C++ do for Transactional Memory?
53mVariables in Haskell
27mOpen Transactional Actions: Interacting with non-transactional resources in S...
52mSTM and Structured Concurrency — The Battle with Multithreading Dragons
23mPersistence Semantics for Weak Memory
36mComposable concurrency with Ref + Deferred
01h 03mUsing weakly ordered C++ atomics correctly
