lua-users home
lua-l archive

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

Ryanne:  Ok, I understand that threads inherit their environment from
the parent state, but from my testing if you run a script which
defines global functions inside of a thread, it is automatically
placed in the parent state as well.  Therefore, it seems like the
globals table is shared between ALL threads...  is this true?

Rici:  Thanks for the link!  It seems to talk a lot about "closures"
but I'm not sure what they are.  I've searched the Wiki and have seen
some information but it was still a bit confusing... Can you explain
this a little more to me?

Also, if anybody has any ideas on how I can have each script "aware"
of it's owner (eg. the current player running the script, or the
current npc/object/room) please let me know.  I'm having a ton of
problems doing this... (I obviously can't use global variables because
then they will be shared between ALL connections running scripts,

On 12/21/05, Rici Lake <> wrote:
> On 21-Dec-05, at 7:34 PM, John Klimek wrote:
> > In case nobody saw my last e-mail (from the "Is lua thread safe?"), I
> > have some more questions...
> I copied an earlier mailing list message on this subject to the Wiki at
> <> (it's unchanged from the
> original message except for the correction pointed out by David
> Burgess.)