HN Hall of Fame Weekly email

Libmill: Go-Style Concurrency in C

libmill.org Software & code Software projects Software engineering Candidate
Visit current URL The originally submitted URL now redirects to the address above. Updating the destination does not change the item’s HN history, Hall membership, or rank.Try original URLArchived copy Best HN thread
Screenshot of libmill.org captured 2026-07-20
Page preview · captured 2026-07-20

Submission timeline

2007–2026

One slot for every year since HN launched. Height is that year's peak points; orange marks a 100+ point or 50+ comment breakout. Select a bar to open its strongest thread.

Top comments

The macro should be called select, since that's what Go calls it. (Of course I know there is a POSIX function (not C) by that name; so what). This "choose {" "end }" business is an awful way to design the macro. If you need nesting that involves a block, with prolog and epilog material on either or both ends, you just have to hide that into the macro: selbegin; out(ch, int, 42): foo(); in(ch, int, i): bar(i); otherwise: baz()…

This is interesting, but I don't really understand the differences with the existing coroutine libraries like libtask, libconcurrency or libcoro. Of course, it uses the longjmp/setjmp trick, as suggested by Dmitry Vyukov. http://www.1024cores.net/home/lock-free-algorithms/tricks/fi... However, I'm not sure of the benefit of this approach, compared to writing a few lines of stack switching assembly code per architecture. Especially, how portable are the implementations of longjmp and setjmp across the multitude of…

dfritz·203-point thread·

Why not call this for what it is? It's CSP in C. Go is not the only language in which CSP is used as the concurrency model. I understand using "Go-style" as an adjective to describe this makes it easier for the uninitiated but it's doing everyone a disservice IMHO.

The first top-level comment from each of the four biggest threads, in HN’s own order. Excerpts are shortened; open a comment for full context.

HN stats

Breakout years
3

100+ points or 50+ comments

Total points
630

reference only — not used in Hall rules or ranking

Total comments
213

reference only — not used in Hall rules or ranking

Every submission

DateTitle as submittedByPointsComments
2015-11-18Go-style concurrency in CFirst breakoutJerry220383
2019-05-10Libmill: Go-Style Concurrency in CBest threadCieplak23376
2022-03-16libmill - Go-style concurrency in CLatest 20+ point returngraderjs19454