New series: Concurrency in Serene's Runtime
I've just wrapped up a three-part series on my personal blog about how concurrency works inside Serene's runtime - from picking the core abstraction all the way to a working HTTP server built on it.
If you've ever wondered why Serene uses fibers, how they can suspend across JIT and foreign C frames without function colouring, or how the scheduler and IO reactor fit together, this is the deep dive:
Part 1 — Choosing the Building Blocks A tour of the popular concurrency building blocks — threads, callbacks,
async/await— what each one costs, and why fibers won.Part 2 — Fibers, the Scheduler and the Reactor Inside Serene's fibers: frozen call chains, guard pages, a scheduler that knows nothing, and the IO Reactor that feeds it.
Part 3 — A Tiny HTTP Server Putting the fibers and IO Reactor to work in a small HTTP server that spawns a fiber per connection.
Best read in order, but each part stands on its own. Feedback welcome!