lua-users home
lua-l archive

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

Hi. I'm using the latest version of lua 4, the one just before the 5th version appeared. I want to ask u how can we have multithreading in lua.In my program i have an application and 3 lua states in it.i've implemented some lua functions so i can execute functions in each state from any other state of the other 2. let's say in my application i run a file(with dofile) in the main state wich says the other states to execute each other a separate file.if in one of the files for the non-main states contains an inifinite cycle(like a "while" that is running until an event generated by a user action take place the other non-main state doesn't execute it's no matter how many lua states i have, when one of it is running something that doesn't finish the others do nothing. How can i implement the multithreading then?
Please answer as quickly as possible