# Bringing Go-Flavored Concurrency to C with POSIX Threads

Original title: Go-Flavored Concurrency in C

> Hacker News story 48894637 · language: en · submitted 2026-07-13
> Web version: https://zeli.app/story/48894637
> About this feed: https://zeli.app/llms.txt · Agent guide: https://zeli.app/skill.md

▲ 14 · by [ibobev](<https://news.ycombinator.com/user?id=ibobev>) · 💬 1
[original](<https://antonz.org/concurrency-in-c/>) · [HN discussion](<https://news.ycombinator.com/item?id=48894637>)

## Summary

I explored how closely we can mimic Go's effortless concurrency in C using only POSIX threads for my Solod project. While native OS threads lack the efficiency of lightweight goroutines, I found that with honest tradeoffs, we can build a robust system using mutexes, condition variables, and worker pools. This approach offers a practical path to concurrent C without a runtime, though it requires careful management of thread creation and resource usage.

## Key quote

> In the end, I came to the conclusion that you can do quite a lot with pthreads — as long as you're honest about the tradeoffs.

## HN discussion (1 comments)

### [BoingBoomTschak](<https://news.ycombinator.com/item?id=48895160>)

> Just a small "ackchyually": Go is basically a modern Limbo which is itself based on Alef and there was an official "Alef for C" thing in Plan 9 in libthread (https://9p.io/magic/man2html/2/thread)
>
> EDIT: looks like it was ported on UNIX as part of Plan9Port (https://github.com/9fans/plan9port/blob/master/src/libthread...)

### [dandersch](<https://news.ycombinator.com/item?id=48895937>)

> There is also libmill/libdill, which implements go-style coroutines using setjmp and is usable directly from C (not just as a transpilation target).
>
> https://libmill.org/

### [fsmv](<https://news.ycombinator.com/item?id=48895413>)

> But select statements are the most important part, and second to that is the fact that goroutines are low cost user space threads

---

## Cite

- Page: https://zeli.app/story/48894637
- Date: 2026-07-13
- Source: antonz.org (https://antonz.org/concurrency-in-c/)
- Hacker News: https://news.ycombinator.com/item?id=48894637

## Other languages

- zh: https://zeli.app/zh/story/48894637 · markdown: https://zeli.app/zh/story/48894637.md
- ja: https://zeli.app/ja/story/48894637 · markdown: https://zeli.app/ja/story/48894637.md
- ko: https://zeli.app/ko/story/48894637 · markdown: https://zeli.app/ko/story/48894637.md
- de: https://zeli.app/de/story/48894637 · markdown: https://zeli.app/de/story/48894637.md
- es: https://zeli.app/es/story/48894637 · markdown: https://zeli.app/es/story/48894637.md
