Runloom Brings Go-Style Fibers to Python Concurrency
Runloom is an experimental extension for free-threaded CPython 3.13t that brings Go-style, work-stealing fibers to Python, matching Go's networking throughput in benchmarks.
Python's asyncio concurrency model relies on cooperative task-switching within a single event loop, meaning one blocking coroutine can stall everything else. Offloading work to threads doesn't fully solve this either, since mixed async/thread code can introduce deadlocks and a single event loop still only executes one thing at a time. Go avoids this by using a runtime scheduler that spreads goroutines across OS threads and rebalances work automatically through work-stealing.
Runloom, the project detailed here, is an experimental C extension targeting free-threaded CPython 3.13t+ that brings this Go-style model to Python. It runs stackful fibers across OS-thread-backed "hubs," each with its own work-stealing deque, I/O poller, and scheduler loop. Fiber stacks start at a conservative 512 KiB but only pay for touched memory pages, keeping per-fiber overhead manageable.
Benchmarks show Runloom matching Go's throughput for echo requests and connection churn, with Cython-compiled handlers landing within 8% of Go's CPU-bound performance—while pure Python trails roughly 180x behind. Notably, the author designed the architecture and testing strategy while letting an AI model write the actual runtime implementation, then validated reliability through heavy stress testing, fuzzing, deterministic simulation, and running real-world open-source test suites through an asyncio compatibility bridge.
For engineers, this points to a path where Python could offer Go-like concurrency without abandoning the language for networked or CPU-bound services. That said, the project remains explicitly experimental, comprising over 30,000 lines of C implementing complex concurrency algorithms, with Linux as the most thoroughly tested platform so far.