lua-users home
lua-l archive

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


  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)