lua-users home
lua-l archive

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

On 2-Feb-06, at 8:01 PM, Chris wrote:

That doesn't make sense to me.  Different universes accessing each other is the same thing as as the same universe from different threads.  They are both native threads, doesn't matter if they are Lua universes or not.

I am strictly not speaking about coroutines.  Maybe that's all the locking in Lua is for, I don't know.  I'm talking purely native threads here.

If they are unrelated Lua states, they do not need to be locked from each other; the Lua interpreter does not use any globals at all. You may need to lock internal (i.e. non-Lua) datastructures; the lua_lock() mechanism will not help you with that.

I can't see what else you might mean by universes accessing each other. You cannot randomly access a Lua state's stack while that Lua state is actively running a script.