9 Sep 1997 17:16
RE: Thread-support in LUA
Tony Wetmore <wetmore <at> kesmai.com>
1997-09-09 15:16:13 GMT
1997-09-09 15:16:13 GMT
Luiz, > We currently are working on exactly this extension for Lua 3.1. Do you have an idea when you might be releasing v3.1 of Lua? Can you describe what exactly you intend to implement in 3.1 to address the "thread" issues discussed here? Along with a co-worker, I am currently investigating various "embedded languages" for use in our games, and need to decide which language to integrate fairly soon. The other languages we are currently considering are Tcl and Python. The single biggest problem that I see with Lua is the global environment, where Lua seems to assume that you are only running one Lua program at a time. We would like to use an embedded programming language to control many objects within our game, each having its own "brain". Lua is one of our top choices for such a language, obviously, but currently we would add this multiple environment layer on top of Lua. If you guys are already working on such an enhancement, however, that's better! :) Thanks for all the great work! +===========================================+=====================+ | Tony Wetmore (mailto: wetmore <at> kesmai.com) | Senior Programmer | |-------------------------------------------| Kesmai Studios | | Opinions are mine, ALL mine! | Charlottesville, VA |(Continue reading)
Lua 3.1 also is going through a lot of "reengineering", for better
modularity, clarity of source code, etc. But it is not our goal now to
support multiple environments and/or threads.
Multiple environments can be simulated by a proper manipulation of the global
variables. From a Lua point of view (not from C), the only global state are
the global variables. You can save all global variables in a table and later
restore those variables. In this way, you have a rather good approximation of
multiple environments.
(for instance, to save an environment, you can use:
function save ()
RSS Feed