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:
parent
6cbd1b8bf7
commit
5004f31575
7 changed files with 102 additions and 42 deletions
|
@ -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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue