Monix Task: Lazy, Async and Awesome
summary
Monix Task presents a lazy alternative to Scala Future that runs on JVM and Scala.js, ships as Monix 2.3, and interops with Cats. It models a Task as a thunk that returns a Future, provides lazy Future semantics with evalOnce/eval/defer/fork, a stack-safe flatMap, batching for throughput, a scheduler-driven timeout and backoff API, cancelable Future runAsync, memoize on success, parallel gather that cancels losers, a semaphore (example limit 16), a circuit breaker and MVar primitives.
AI-written summary · about
chapters (17)
- 0:00Intro
- 0:47WHAT IS MONIX?
- 4:24EVALUATION IN SCALA
- 7:25MONIX TASK'S BEHAVIOR
- 9:27MEMOIZATION (3/4)
- 12:24TAIL RECURSIVE LOOPS (4/4)
- 14:55NO BOOBY TRAPS (2/2)
- 17:15SCHEDULER (1/4)
- 23:18EXECUTION MODEL: BATCHED
- 23:29EXECUTION MODEL: ALWAYS ASYNC
- 24:01REAL ASYNCHRONY
- 31:24CANCELABLES: SAFE FALLBACKS (2/2)
- 32:30CANCELABLES: BETTER FUTURE SEQUENCE
- 33:09CANCELABLES: LOOPS
- 35:09ERROR HANDLING (3/4)
- 37:09ASYNCHRONOUS SEMAPHORE
- 38:10CIRCUIT BREAKER
related talks
31mTAKING YOUR SIDE-EFFECTS ASIDE
44mCAN WE FREE CONCURRENT PROGRAMMING FROM THE MONADIC STYLE
11mStreaming Libraries Shootout
23mEffects types in Scala - how to choose one
36mAn introduction to monadic structures and functional programming
41mAsync/Await for the Monadic Programmer
32mPRACTICAL REACTIVE STREAMS WITH MONIX
35mPractical Reactive Streams with Monix
