[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Multiple Scripts, Pausing, Threads, and Persistant Variables
- From: erik@... (Erik Hougaard)
- Date: Mon, 20 Mar 2000 18:04:57 +0100
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!
> 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).
/Erik