2 ms·
You can write async/await-style code in C with a simple switch-case state machine. It's not quite as convenient as aync-await support directly in the language,
by flohofwoe 6y ago
You can write async/await-style code in C with a simple switch-case state machine. It's not quite as convenient as aync-await support directly in the language, but what's happening underneath is the exact same thing.
(meaning: blaming "state machine layout" on the capabilities of the implementation language seems a bit of stretch to me, since async-await language support is essentially just (very high level) syntax sugar for a function that consists of a switch-case block and takes a context pointer as additional argument).