[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Segmentation fault: Lua and pthread
- From: Duboucher Thomas <thomas.duboucher@...>
- Date: Fri, 19 Jun 2009 21:22:19 +0200
In llimits.h, you have also an interesting piece of code
#ifndef lua_lock
#define lua_lock(L) ((void) 0)
#define lua_unlock(L) ((void) 0)
#endif
#ifndef luai_threadyield
#define luai_threadyield(L) {lua_unlock(L); lua_lock(L);}
#endif
I'm not 100% sure, but I remember that it's a way to have a thread safe
Lua librairy while using different Lua threads into different C threads.
The only drawback is that you need to rebuild your own Lua librairy.