lua-users home
lua-l archive

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


On Jul 22, 2004, at 12:05 PM, Kevin Baca wrote:

If your global state is immutable then, instead of all threads sharing a
single state, can you have multiple identical lua states, each in its
own thread?  Maybe a lua state pool?  When you need to call a compute
function, grab a state from the pool and compute away.

That's a good thought; the problem is that there are large shared structures that take a while to load/reconstruct from the database...but there's no reason that multiple lua instances can't point to the same object, just as long as they don't try to collect it. Never mind.

I'll just have to play with this for a while and see what I come up with. Thanks for the pointers; after I have a bit of experience, I'll try to write something up on the wiki.

-Johann