From a67760f7c98a9e57a61ee9c61a2175a33ebcb91b Mon Sep 17 00:00:00 2001 From: "madmaxoft@gmail.com" Date: Sat, 15 Jun 2013 15:29:20 +0000 Subject: First attempt at fixing the inter-threading deadlocks between the tick thread and the socket thread git-svn-id: http://mc-server.googlecode.com/svn/trunk@1591 0a769ca7-a7f5-676a-18bf-c427514a06d6 --- source/World.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'source/World.h') diff --git a/source/World.h b/source/World.h index 21869bd41..fe339ea61 100644 --- a/source/World.h +++ b/source/World.h @@ -66,6 +66,19 @@ public: dimEnd = 1, } ; + // tolua_end + + /// A simple RAII locker for the chunkmap - locks the chunkmap in its constructor, unlocks it in the destructor + class cLock : + public cCSLock + { + typedef cCSLock super; + public: + cLock(cWorld & a_World); + } ; + + // tolua_begin + static const char * GetClassStatic(void) { return "cWorld"; -- cgit v1.2.3