1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-08-11 17:51:04 +00:00

Fix Lua scripting synchronization

For several years now, the lua script lock has been completely broken.
This commit fixes the main issue (creation of a temporary rather than
scoped object), and fixes a subsequent deadlock issue caused by
nested script API calls by adding support for recursive mutexes.
This commit is contained in:
kwolekr 2015-10-31 16:31:43 -04:00
parent d198e420ec
commit 52e5b513ed
5 changed files with 57 additions and 17 deletions

View file

@ -49,7 +49,7 @@ DEALINGS IN THE SOFTWARE.
class Mutex
{
public:
Mutex();
Mutex(bool recursive=false);
~Mutex();
void lock();
void unlock();