Re:Async.h – asynchronous, stackless subroutines in C
by aelo on Saturday September 21, 2019 @04:20AM
(#21034142)
What one should mention is that his version of coroutines is also stateless. That's why you need either stackful coroutines written in assembly or support in the language/compiler or operating system. Special case versions where you can avoid backing up the stack frame exist in other projects too, like in asio: https://github.com/chriskohlhoff/asio/blob/master/asio/inclu...
But in my opinion I would not use them for generic use cases and rather wait for the official support in C++20.
Of course I'm aware that I'm talking about C++ here and the situation for C might be slightly different.
But in my opinion I would not use them for generic use cases and rather wait for the official support in C++20.
Of course I'm aware that I'm talking about C++ here and the situation for C might be slightly different.