[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: lua_newthread multithread problem
- From: brianyao <brianyao@...>
- Date: Wed, 20 Jan 2010 01:59:39 +0800 (CST)
Recently ,I want to load some script and also register some cfunctions to the MasterState( generated by luaL_Create ).Then I Create a lot of Threads (Posix Local Thread) with one ThreadState per thread.The ThreadState is created with lua_newthread(MasterState) before launch all the threads.I'm wondering,If it is multhreaded safe,if every ThreadState just run functions in MasterState enviroment which guaranteed not modify the global shared datas in MasterState.
Can anybody help me ! thanks.