3 ms·
If you like Lua coroutines and C++20 coroutines, I have written a piece of code that allows to combine both: https://github.com/CM4all/libcommon/blob/master/src
by max_k 3y ago
If you like Lua coroutines and C++20 coroutines, I have written a piece of code that allows to combine both: https://github.com/CM4all/libcommon/blob/master/src/lua/CoAwaitable.hxx https://github.com/CM4all/libcommon/blob/master/src/lua/CoAw...
It's used for example by our "myproxy" project: https://github.com/CM4all/myproxy/blob/master/src/Connection.cxx https://github.com/CM4all/myproxy/blob/master/src/Connection... (Ctrl-F Lua::CoAwaitable) - a Lua coroutine is launched from within a C++20 coroutine and the C++20 coroutine awaits the Lua coroutine. Everything integrated in a non-blocking I/O event loop.
- krylon 3y agoI am not a C++ person, but that does sound nice. I'm just not ready for the kind of commitment it takes to dive into C++. ;-)