lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

> On Nov 28, 2018, at 4:39 AM, Philippe Verdy <> wrote
> Si we can't do that in pure Lua with its existing standard library. We need an extension to threads, or we need to use OS threads to instantiate as many separate Lua engines, using a hos application written in C and using the reentrant luac library...

Which is exactly what we did on our project .. each Lua VM was event driven from an event queue and each event call was monitored for time via debug hooks and memory usage via a custom allocator. We then built a dispatcher using an OS thread pool to drive the VMs. The fact that we could do all that without a single patch to the Lua source was a testament to its clean design.

And imho that is the point of Lua .. it’s a clean efficient building block you can mold to your needs, not an imposing edifice that must be used in a particular manner.