[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Lua Multistate
- From: "Russell Y. Webb" <rw20@...>
- Date: Fri, 14 Jul 2000 08:36:41 -0700
>>Presumably, tag methods that I set in one state won't be set in a new state,
>>right?
>>If not, is there a "lua_copystate" function so that I can copy all the tag
>>methods I've set, types I've created and functions I've registered to a
>>newly created state?
Here's what you can do. Install all your tags, files, and objects through
wrapper functions that record what is being installed as strings or
filenames then the original thread can spawn another and pass it a string
or filename to initialize itself. Putting all the initialization into one
file and just telling the new thread (state) to call dofile on it would
seem to be cleanest.
Just a quick idea which is likely to have some flaws.
Russ