[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: RE: Multithreading
- From: "Tim McDaniel" <tim@...>
- Date: Mon, 14 Mar 2005 12:16:17 -0600
I assume by "Lua universe", you mean everything derived from one call to lua_open?
> -----Original Message-----
> From: lua-bounces@bazar2.conectiva.com.br
> [mailto:lua-bounces@bazar2.conectiva.com.br] On Behalf Of Mark Hamburg
> Sent: Monday, March 14, 2005 11:55 AM
> To: Lua list
> Subject: Re: Multithreading
>
> No. The garbage collector is shared across the Lua universe.
>
> You can, however, create multiple Lua universes and run them
> from separate threads. This is generally much more efficient
> than the LuaThreads approach but does require building a
> gateway to communicate information across universes.
>
> Mark
>
> on 3/14/05 9:45 AM, Tim McDaniel at tim@medusalabs.com wrote:
>
> > I understand that the child lua_States created with lua_newthread
> > share their global table with the parent lua_State. It is also
> > apparent that Lua has no inherent synchronization. I am aware of
> > LuaThread, but let's ignore that for now... :)
> >
> > So, my question is...
> > If I have a parent lua_State loaded with all my script, can
> I create
> > child lua_States and safely call them from multiple
> threads, as long
> > as they do not modify the global table?
> >
> > Thanks,
> > Tim
> >
> >
>
>