Hongseok Yoon
Hongseok Yoon

Reputation: 3318

Is it okay calling Lua function from different thread(embedding Lua in C++)?

I'm using VS2008, lua 5.1 and luabind 0.9.1.

Calling Lua function from C++ works just fine.

If there're several threads and Lua function is invoked from each thread, has this situation any problem? There is only ONE Lua state.

In that situation, should I have more Lua state? Which one is common?

Upvotes: 4

Views: 5888

Answers (1)

jpjacobs
jpjacobs

Reputation: 9549

That's not OK just like that. The Lua users wiki has a nice page about threading.

Upvotes: 5

Related Questions