[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Embbeding LUA/multithread
- From: "David Diaz" <dr_picu@...>
- Date: Thu, 11 Jan 2001 10:57:38 -0000
Hi !!! I'm new on the list. My name's David. I'm trying to
embbed LUA 4.0 on my game engine and I've got a problem:
I need to run many scripts at the same time concurrently on
the same lua_state. This is so 'cause I register many functions
that would act as an API interface from LUA scripts to my engine.
The problem is that Lua seems not to support concurrent access
to states. Is this true ? Is there any way to implement this ?
Since now I'm creating a new state for each script. Then I
register the API functions on EVERY state, and launch the
script. As I create a new state for every script running, I
have to register ALL the API functions (near 300) for each
script run and I can't use global variables. Loosing global
variables are not a problem, but I don't like to register
the functions each time.
Any Idea ? Thax 8)