[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: once again, cooperative multitasking?
- From: Taj Khattra <taj.khattra@...>
- Date: Tue, 13 Apr 2004 23:33:52 -0700
On Tue, Apr 13, 2004 at 10:46:16PM -0700, Mark Hamburg wrote:
> For preemptive C threads, what I'm currently doing is generating a lua_State
> per C thread and using a single mutex managed by lua_lock and lua_unlock to
> coordinate amongst them. This means that at most one thread can be actually
> executing within the Lua universe at once.
i'm curious to know why you need lua_lock/lua_unlock if you have a
distinct lua_State per C thread, since from the Lua core's point of
view they shouldn't interfere - do they need to serialize access to
some shared non lua_State state ?
thanks