News for hackers. Stuff that matters.
Re:Async.h – asynchronous, stackless subroutines in C by huxingyi on Saturday September 21, 2019 @08:54AM (#21035064)
Neat! I checked the async.h, looks like it doesn't support nested calls? I did a similar toy many years ago, which could be used with other async libraries such as libuv: https://github.com/huxingyi/c-block
Re:Async.h – asynchronous, stackless subroutines in C by naasking on Saturday September 21, 2019 @10:28AM (#21035570)
Nested async calls are supported, there's an example at the end of the article. Ordinary calls simply have to return before the next await statement, and obviously you don't want to make blocking calls.

Async/await semantically doesn't support resumption from deep in the stack, so it's a good choice for this sort of trick.