4 ms·
If you want coroutines before upgrading to a C++20 toolchain, you can also try: - boost::Fiber for C++: https://www.boost.org/doc/libs/1_70_0/libs/fiber/doc/ht
by alexhutcheson 7y ago
If you want coroutines before upgrading to a C++20 toolchain, you can also try:
- boost::Fiber for C++: https://www.boost.org/doc/libs/1_70_0/libs/fiber/doc/html/index.html https://www.boost.org/doc/libs/1_70_0/libs/fiber/doc/html/in...
- boost::coroutine2 for C++: https://www.boost.org/doc/libs/1_70_0/libs/coroutine2/doc/html/index.html https://www.boost.org/doc/libs/1_70_0/libs/coroutine2/doc/ht... (lower level than boost::Fiber, and doesn't include an internal scheduler)
- libtask for C: https://swtch.com/libtask/ https://swtch.com/libtask/
In the C++ context, this doc summarizes the distinction between "fibers" and "coroutines", although the terminology is not consistent across language ecosystems: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n4024.pdf http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n402...
- kitd 7y agoD also has fibers, and good C/C++ integration, so that could be an option too. http://ddili.org/ders/d.en/fibers.html http://ddili.org/ders/d.en/fibers.html