lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

----- Original Message -----
From: Erik Hougaard <>
To: Multiple recipients of list <>
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,
> > example, have a `do_file ("scripta.lua");' in my C++ code, have that
> > set variable pglobal to 25, and on another call to `do_file
> > ("scripta.lua");' or a call to `do_file ("scriptb.lua");' have pglobal
> > 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
> > threads; is it compatible with other Lua add-ons like the socket add-on?
> > game will be a MUD, and there may be several servers running at once to
> > with large player loads, and the servers will need to cooperate
> 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