|
There is (or perhaps I mean there was) LuaTask, which was basically multithreaded Lua (one Lua state per thread) with simple message passing between threads, but no other shared state. Therefore you avoided the need for mutexes and other locking primitives
when accessing data.
The code is archived here if you want to take a look:
https://github.com/LuaDist/luatask
I used it for a basic multithreaded (non-forking but non-asynchronous) LuaSocket-based TCP server once and it worked OK for me...
...but that was ages ago.
I suspect it might need a bit of hacking to compile correctly with Lua 5.4.x. Haven’t used it or even tried to build it for years.
|