lua-users home
lua-l archive

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


Hi,

 

I have a multi-threaded application in ‘C’ which invokes LUA functions. Because of the fact that LUA is a single threaded language I have used a global LUA state and used a mutex to serialize the access to global LUA state among the multiple threads. But this implementation has a performance bottleneck because of this serialization aspect.

 

To get rid of this serialization, is it feasible to maintain LUA state on a per thread basis? But I can foresee some issues with the LUA global. We might require synchronizing these LUA global variables. Has anyone tried this out? Some practical example would really help.

 

With regards,

Vivek Gupta