[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Multiple Scripts, Pausing, Threads, and Persistant Variables
- From: "Sean Middleditch" <sean.middleditch@...>
- Date: Tue, 21 Mar 2000 10:12:23 -0500
----- Original Message -----
From: Erik Hougaard <erik@hougaard.com>
To: Multiple recipients of list <lua-l@tecgraf.puc-rio.br>
Sent: Monday, March 20, 2000 12:05 PM
Subject: Re: Multiple Scripts, Pausing, Threads, and Persistant Variables
> Sean Middleditch wrote:
> > Another question is does Lua have "persistant" global varibales? Can I,
for
> > example, have a `do_file ("scripta.lua");' in my C++ code, have that
script
> > set variable pglobal to 25, and on another call to `do_file
> > ("scripta.lua");' or a call to `do_file ("scriptb.lua");' have pglobal
still
> > defined with a value of 25? If not, I'll just implement it through C
> > extensions... ;-)
>
> YES!
Yes, I found that out earlier today... I feel dumb now... ;-)
> > Also, is Lua thread safe? I recall seeing a version specifically made
for
> > threads; is it compatible with other Lua add-ons like the socket add-on?
My
> > game will be a MUD, and there may be several servers running at once to
deal
> > with large player loads, and the servers will need to cooperate
properly.
>
> Well there is a luaMT thats a implementation of Posix threads - I'm not
> sure its updated for 3.2 ?? . I have also made a multi-state version of
> Lua thats thread safe because your would be running each thread in its
> own state. (Ofcause then its without sharing any information).
Ick, I'm afraid that won't help... I'd need them to share information...
::sigh:: And no, LuaMT is based on Lua 3.1. ::bigger sigh::
> /Erik
Sean Middleditch