lua-users home
lua-l archive

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


Ok,

 

First of all, I want to know whether we can create multiple lua states in one thread? I tried it and the second lua state that I created was crashing whenever I tried to load a script with it!

 

Secondly, I want to know the overhead associated with each lua state in case you can create more than one in a thread? Because if I can create multiple states in a thread, then the sort of thing I am targeting right now, I could end up creating 100s of lua states, if nothing else works.

 

Thirdly, isn’t there any way in which I can create variables, that are global to a particular script and not for the whole lua state. Something like static variables at global/function scope in C.

 

I know I can use tables, but I would make it easier for the developer, but not forcing him into using tables.

 

Any help shall be highly appreciated.

 

Regards,

 

Zulfiqar Inayat Malik.