[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: RE: Are lua_State's thread safe?
- From: "Dolan, Ryanne Thomas (UMR-Student)" <rtdmr6@...>
- Date: Wed, 14 Dec 2005 13:12:00 -0600
You will have to use synchronization techniques such as mutexes to keep
different threads from accessing the lua_State at the same time, or else
you will get unexpected results and crashes.
Really you will need to keep threads from accessing your LuaManager
object at the same time also for the same reasons. Anytime a shared
variable is manipulated by different threads you need to use
[mailto:email@example.com] On Behalf Of John Klimek
Sent: Wednesday, December 14, 2005 12:28 PM
To: Lua list
Subject: Are lua_State's thread safe?
I'm wondering if I can create a single object (lets call it
LuaManager) with a method called RunScript and then have several
socket threads share the same object which is sharing the same
Is this possible? Is it safe?