mirror of
https://github.com/moonlight-stream/moonlight-common-c.git
synced 2025-08-17 17:05:50 +00:00
Fix busy loop if a spurious signal of the queue event happens
This commit is contained in:
parent
3a9e37832a
commit
678afd9c30
@ -152,6 +152,7 @@ int LbqWaitForQueueElement(PLINKED_BLOCKING_QUEUE queueHead, void** data) {
|
|||||||
PltLockMutex(&queueHead->mutex);
|
PltLockMutex(&queueHead->mutex);
|
||||||
|
|
||||||
if (queueHead->head == NULL) {
|
if (queueHead->head == NULL) {
|
||||||
|
PltClearEvent(&queueHead->containsDataEvent);
|
||||||
PltUnlockMutex(&queueHead->mutex);
|
PltUnlockMutex(&queueHead->mutex);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user