mirror of
https://github.com/luanti-org/luanti.git
synced 2025-11-09 03:25:28 +01:00
Make MutexQueue use jsemaphore for signaling
This commit is contained in:
@@ -51,6 +51,21 @@ void JSemaphore::Wait() {
|
||||
INFINITE);
|
||||
}
|
||||
|
||||
bool JSemaphore::Wait(unsigned int time_ms) {
|
||||
unsigned int retval = WaitForSingleObject(
|
||||
m_hSemaphore,
|
||||
time_ms);
|
||||
|
||||
if (retval == WAIT_OBJECT_0)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else {
|
||||
assert(retval == WAIT_TIMEOUT);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
int JSemaphore::GetValue() {
|
||||
|
||||
long int retval = 0;
|
||||
|
||||
Reference in New Issue
Block a user