lua-users home
lua-l archive

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


>From jeske@home.chat.net Thu Jan 15 01:09:44 1998
>
>However, I'm curious to know why the multiple contexts are switched by switching a
>global variable. This single piece of global state makes it impossible to run two
>lua environments simultaneously in separate OS threads.

We know about this. However, different OS's deal with multithreading in
different ways, all non-ANSI and all non-POSIX (I think multithreading is
still a proposal in POSIX).
Besides, we think that multiple contexts are useful for things other than
multithreading.

>I would much prefer if the environment was explicitly
>passed around as the first parameter of lua functions.

We agree that this is a complete solution and would make multithreading simple.
We haven't discarded this possibility yet. The single global variable storing
the complete state is a step towards this but we prefer to see how people use
it first.
--lhf