Open unicomp21 opened 3 years ago
Sorry, I must be confused. Can't see co_await anywhere.
F-Stack support coroutine, but not co_await.
Why isn't there co_await support?
Is there a way to do something like promises w/ microthread? Is there documentation or examples for how to use microthread?
Why isn't there co_await support?
Because co_await
is officially defined by the ISO/IEC 14882:2020(C++20), but F-Stack's has been released for years and has supported coroutine with micro thread.
Is there a way to do something like promises w/ microthread? Is there documentation or examples for how to use microthread?
app/micro_thread
can achieve synchronous programming and asynchronous execution.
A simple demo program is implemented use microthread in F-Stack, see demo. More documentation of microthread can see it's original repository. There are detailed comments in the code file, but the problem is that the comments are Chinese.
If no one submit pull requeset that use co_await
to support coroutine, we will not modify it ourselves.
micro_thread is a little hard for many people to learn. but it is a good implement.
I'm unclear on the coroutine support. Does f-stack support co_await (c++ 20), similar to asio?
https://github.com/chriskohlhoff/asio/blob/7fe18ba1b3e2bfddb2ef8dd83883b4545d8444bc/asio/include/asio/co_spawn.hpp#L73
Also, is there a websocket implementation using fstack?