Fibers in Jolt: green threads that fit core.async 0 ▲ (iterate think thoughts) 1 hour ago · 17 min read3401 words · Tech · hide · 0 comments Jolt now provides opt-in support to run go blocks on fibers instead of OS threads. This post will discuss how that works along with the different trade-offs made compared to other implementations, and why core.async turns out to be a great fit for the mechanism. All the numbers below are from an Apple M1 Pro with 10 cores, measured with the harness in bench/fibers on the current tree.The problem with a thread per processAs you probably know, core.async's programming model is best served by cheap green processes that communicate over channels. Jolt's original implementation backed every go block with a real OS thread. Using system threads affords the same semantics, and it has a nice property that there's nothing special about a go body. But real threads have significant overheads putting a limit on the number you can reasonably have, and they're not particularly cheap to start.Let's take a look at what that ceiling looks like for threads and fibers when spawning K processes that each… No comments yet. Log in to reply on the Fediverse. Comments will appear here.