lua-users home
lua-l archive

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


On Thu, Jan 15, 1998 at 08:12:10AM -0200, Luiz Henrique de Figueiredo wrote:
> >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 understand. If there is one thing that is non-standard across platforms it's
multithreading. I would never suggest Lua include "direct" support for
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.

Okay, I'll give a status update if/when I end up changing the code to explicitly
pass aroud the environment. :) 

-- 
David Jeske (N9LCA) + http://www.chat.net/~jeske/ + jeske@chat.net