Concurrency with Cats-effect
summary
Cats Effect 1.0 provides fiber-based concurrency and synchronization primitives and shows concrete implementations: a correct parTuple2 that uses bracket to avoid leaking fibers, a debounce combinator that stores cancellation tokens in a Ref and cancels prior fibers, and an unbounded queue built from Ref and Deferred that needed a bracket-based cleanup to fix a timeout memory leak. FS2 and other libraries use these primitives; examples and working code demonstrate the fixes and patterns.
AI-written summary · about
chapters (9)
- 0:00Introduction and background
- 2:21Polymorphic resource management
- 3:46Concurrent type class explained
- 8:41Fixing parallel execution leaks
- 12:11Refs for shared state
- 15:21Debouncing events with Refs
- 22:30Deferred values and queues
- 29:43Cancellation and memory leaks
- 32:53Future of Cats Effect








