[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: RE: Parsing to byte code
- From: "Josh Jensen" <joshj@...>
- Date: Mon, 10 Sep 2001 12:46:05 -0700
> > * It has the ability to be multithreaded. This is critical to
> > background loading processes in Amped. There is also some trickery
> > used with the shared global states that showed up in 4.1 Alpha.
> I don't think I've seen this "trickery used with the shared
> global states" before. Does this mean that multiple
> lua_State's can each have their own private globals as well
> as share some globals? Can someone point me to a link in the
> archives if this has been discussed before?
I'm sorry. I meant to say _I_ use some trickery with the global states,
but it is done in a very, very careful fashion, and certainly shouldn't
be done at all (although it was fun!). Basically, I modified the Lua
code (just for fun) to allow registration of more than one global state
in a global state. I did it to test isolation of static Lua data from
the main garbage collector. It appears to work, but it is very
dangerous. There definitely has got to be a better way.