3 ms·
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 th
by aelo 7y ago
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/include/asio/coroutine.hpp 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.