lua-users home
lua-l archive

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

Hi Everybody,

My name is James (Jim) Pascoe and I have been using Lua for around 18 months now. I absolutely love it - Lua's embeddability, speed and instant appeal to users has meant that Lua is becoming very popular in my company (Blu Wireless). Thank you for all your continued hard work.

Apologies if this has been answered before, but I would really appreciate some clarification on lua_newthread(). My understanding is that lua_newthread() provides a distinct execution stack, so you can have independent pieces of Lua code loaded and run by different Lua threads. Also, the reference manual states that Lua threads created by lua_newthread() share the same global environment, which (as I understand it) means that they point to the same global environment in the parent lua_State. However, what I am trying to understand is whether it is possible to run individual Lua threads in separate OS threads safely? And also, is it possible for Lua threads running in separate OS threads to communicate? 

As I say, I would really appreciate some clarification on this from the community.                                                                                                                         

Thank you very much and have a good weekend,