diff options
author | sapier <Sapier at GMX dot net> | 2013-12-02 22:21:58 +0100 |
---|---|---|
committer | Perttu Ahola <celeron55@gmail.com> | 2013-12-03 17:50:00 +0200 |
commit | 5004f31575c52b59e1fc654dfa08336a692afeee (patch) | |
tree | 6b44e7a6a964ce372b968feba3688518a0647010 /src/jthread/win32 | |
parent | 6cbd1b8bf739e0d776ee508708b5076b491fb638 (diff) | |
download | minetest-5004f31575c52b59e1fc654dfa08336a692afeee.tar.gz minetest-5004f31575c52b59e1fc654dfa08336a692afeee.tar.bz2 minetest-5004f31575c52b59e1fc654dfa08336a692afeee.zip |
Fix broken async locking in release build
Diffstat (limited to 'src/jthread/win32')
-rw-r--r-- | src/jthread/win32/jthread.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/jthread/win32/jthread.cpp b/src/jthread/win32/jthread.cpp index 3d897822e..0781982e2 100644 --- a/src/jthread/win32/jthread.cpp +++ b/src/jthread/win32/jthread.cpp @@ -26,7 +26,8 @@ */ #include "jthread/jthread.h" - +#include <assert.h> +#define UNUSED(expr) do { (void)(expr); } while (0) #ifndef _WIN32_WCE #include <process.h> #endif // _WIN32_WCE @@ -49,6 +50,12 @@ void JThread::Stop() { runningmutex.Unlock(); } +void JThread::Wait() { + int WaitForSingleObject_retval = WaitForSingleObject(threadhandle, INFINITE); + assert(WaitForSingleObject_retval == 0); + UNUSED(WaitForSingleObject_retval); +} + int JThread::Start() { runningmutex.Lock(); |