Functional Async on the JVM
summary
Claims a practical abstraction for async/parallel functional Scala on the JVM built as a monadic Task with now/delay/async that respects JVM constraints (no TCO, expensive threads ≈10,000 limit, costly object churn). Implements a free‑style algebra and an interpreter that encodes trampoline encoded TCO and conserves threads, uses unsafe run with a latch to block only at the world edge. Works for streaming (S2/FS2) and async IO but exposes unsafe edge cases (double callbacks, nontermination, type‑soundness traps).
AI-written summary · about
chapters (12)
- 0:00Introduction
- 1:03JVM and Scala async context
- 6:02Tail call elimination limits
- 8:10Threading and GC limits
- 13:10Functional async abstraction design
- 26:09Monadic task structure
- 31:31Free monad task implementation
- 38:32Unsafe task execution
- 44:51Practical async benefits
- 49:07Async drawbacks and safety
- 51:10Task implementation pitfalls
- 52:13Q&A
related talks
01h 12mAsynchronous and Concurrent Programming in Scala Part 3
01h 53mAsynchronous and Concurrent Programming in Scala Part 2
58mBlazing Fast, Pure Effects without Monads
01h 28mAsynchronous and Concurrent Programming in Scala Part 1
48m10 tips to write fast stack-safe functional code in Scala: the automatic-batch…
58mMonads in Chains
47mWhirlwind Tour of the Scala Functional Programming Ecosystem
45mZIO: Next-Generation Effects in Scala
