1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-07-27 17:28:41 +00:00

Fix broken async locking in release build

This commit is contained in:
sapier 2013-12-02 22:21:58 +01:00 committed by Perttu Ahola
parent 6cbd1b8bf7
commit 5004f31575
7 changed files with 102 additions and 42 deletions

View file

@ -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();