lua-users home
lua-l archive

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

As I've mentioned before, myself and my coding partner are using Lua
in a way that I've seen enough times in other contexts that I'd call
it a pattern: Lua as an operating system thread's business logic.

So, we've had to do all of the things that others do as well; moving
Lua values between states being the most obvious example. We are using
a message passing pattern, of course, and are very happy with how Lua
is working out, so far.

Neither of us feel experienced enough to suggest additions or
changes[1]. However, some of you have more than a decade of such
experience! Also, asking may have the happy side effect of revealing
flaws in the ways that we're doing it!

Does anything come to mind when one thinks of improving the C API, Lua
and managing multiple states between operating system threads[2]?


[1] We thought about a multi-state xmove that worked across lua_states
and that didn't support lua functions or c closures. But then we
thought that might be better as a separate library...

[2] I'm not suggesting that Lua add multi-threaded capabilities, only
that there might be some utility calls that would help people that are
implementing applications that work this way.