Dev Radar
Support
LiveUpdated 2026-10-30 20:27 UTC

Simon Tatham, the creator of PuTTY, found a way to fake coroutines in standard C using…

Simon Tatham, the creator of PuTTY, found a way to fake coroutines in standard C using the same switch/case trick…

This is a dev post classified by AGK Intelligence as Terminal & editor (a tutorial), kept by the Dev Radar because it carries real work, not commentary.

Simon Tatham, the creator of PuTTY, found a way to fake coroutines in standard C using the same switch/case trick behind Duff's Device. He combined it with __LINE__ so a function could return a value, remember exactly where it stopped, and resume there on the next call. no threads & assembly just a few macros. PuTTY still uses versions of this trick in its SSH protocol code. Here's a minimal example:

Posted by Arika (9k followers) 1 days ago · 898 likes · 44.9k views · view the original post on X. Kept by the Dev Radar as Terminal & editor.

More dev work like this

Every post is read and classified by AGK Intelligence: what it is, which market it belongs to, and whether the link is a real tool. 31.2k posts from 5k X accounts over the last 21 days, 8.8k tools, 12 markets. New posts are collected several times an hour and the full ranking is recomputed every hour — last update 2026-10-30 20:27 UTC. Full method.