summaryrefslogtreecommitdiff
path: root/src/threading/mutex.h
diff options
context:
space:
mode:
authorkwolekr <kwolekr@minetest.net>2015-10-31 16:31:43 -0400
committerkwolekr <kwolekr@minetest.net>2015-11-01 11:32:05 -0500
commit52e5b513ed9dc143c967c733423fe751e1b663d1 (patch)
tree524462147e28889f655cb2ae867ebb412d9c75e3 /src/threading/mutex.h
parentd198e420ec54be47fe2285b3205953282ec06742 (diff)
downloadminetest-52e5b513ed9dc143c967c733423fe751e1b663d1.tar.gz
minetest-52e5b513ed9dc143c967c733423fe751e1b663d1.tar.bz2
minetest-52e5b513ed9dc143c967c733423fe751e1b663d1.zip
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.
Diffstat (limited to 'src/threading/mutex.h')
-rw-r--r--src/threading/mutex.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/threading/mutex.h b/src/threading/mutex.h
index f1a4882b7..62a482787 100644
--- a/src/threading/mutex.h
+++ b/src/threading/mutex.h
@@ -49,7 +49,7 @@ DEALINGS IN THE SOFTWARE.
class Mutex
{
public:
- Mutex();
+ Mutex(bool recursive=false);
~Mutex();
void lock();
void unlock();