Engineering posts
Go-style channels and worker pools built on pthreads in C
- Category: Engineering post
- Status: discussion
- Sources: write-up, HN 48894637
- Summary: A 2026-07-10 post by Anton Zhiyanov implements Go's concurrency primitives in C for Solod, a strict Go subset that compiles to plain C with no runtime or garbage collector. Channels use a mutex-guarded ring buffer when buffered and a rendezvous copy when unbuffered, and a fixed worker pool consumes a bounded queue. The pool benchmark lands within 1.1x of Go on realistic 40 microsecond tasks, while unbuffered channels run about 23x slower because of kernel wakeup costs.
- Why it matters: It maps the cost of Go's concurrency model onto raw pthreads and shows where the runtime scheduler earns its keep.