mirror of
https://github.com/luanti-org/luanti.git
synced 2025-11-08 11:05:28 +01:00
Fix broken async locking in release build
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user