CONQUERING CONCURRENCY WITH FUNCTIONAL PROGRAMMING
summary
Argues that purely functional code handles real concurrency by making shared state explicit and composable, using Ref for atomic state in IO, Deferred as a pure promise, IO and fibers for cancelable effects, plus semaphore and memoize for coordination. Shows a race combinator that cancels losers without leaks by flat‑mapping a shared deferred/ref, explains why creating refs must live in IO, compares this to blocking locks and heavyweight actors, and reports production use.
AI-written summary · about
chapters (12)
- 0:00Introduction
- 0:13The need for concurrency
- 0:39Managing state in FP
- 9:02Locking mechanisms
- 9:18Actor model and Ref
- 19:51Referential transparency
- 21:08Testing concurrent code
- 21:29Refactoring benefits
- 22:26Cats Effect overview
- 24:04Building custom abstractions
- 28:27Final thoughts and Q&A
- 29:04Conclusion
related talks
36mComposable concurrency with Ref + Deferred
03h 29mConcurrency with Clojure
01h 16mConcurrency Approaches: Past, Present, and Future
39mShared State In Pure Fp When A State Monad Won't Do
39mConcurrent Languages are Functional
01h 06mThe Joy of Functional Programming
01h 02mFunctional C++
36mConcurrency with Cats-effect
