Evolving Clojure with Virtual Threads
summary
core.async originally compiles go blocks into state machines via the analyzer and go macro; the new implementation swaps that for virtual threads, keeping the same API and semantics while removing the analyzer maintenance burden. It introduces three workload executors (IO, compute, mixed), maps parking ops to blocking on vthreads, and adds core.async.flow to run pure step functions on workload-appropriate executors with built-in topology, lifecycle, and error handling. Initial microbenchmarks show faster coordination but different heap characteristics to investigate.
AI-written summary · about
chapters (11)
- 0:00Introduction
- 4:15Clojure overview
- 7:28Clojure on JVM
- 10:02Core async basics
- 15:41Go blocks execution
- 17:53Evolving core async with virtual threads
- 21:47Compatibility and testing
- 26:46Introducing Flow
- 35:59Summary
- 36:43Q&A: Multi-arity vs protocols
- 38:07Q&A: Virtual threads timing
related talks
44mClojure core.async Evolution
49mEven threads are now virtual:past, present, future of concurrency in Java.
47mConcurrent and Asynchronous Programming: Loom in Java 20 and 21
31mJava Virtual Threads
53mVirtual Threads: Ushering in a New Era of Concurrency
01h 00mLoom Virtual Threads in the JDK 20
57mUnveiling the Magical Power of Java Virtual Threads
49mPrepare for what “Loom”s ahead.
