←back to thread

142 points jmillikin | 1 comments | | HN request time: 0.208s | source
1. user____name ◴[] No.44549484[source]
I've recently read a bunch of articles explaining these weird macro soup setups for emulating coroutines in C. This one is probably the most advanced writeup in implementing fibers/coroutines I came across. The focus is on a multithreaded context, which seems to complicate things a lot. Honestly I feel like you need language level support for them in that case, they seem more trouble than they're worth otherwise, at least in plain C.

https://graphitemaster.github.io/fibers/