mirror of
https://github.com/moonlight-stream/moonlight-common-c.git
synced 2026-04-03 06:16:04 +00:00
Fix size tracking in LBQ
This commit is contained in:
@@ -87,12 +87,14 @@ int LbqWaitForQueueElement(PLINKED_BLOCKING_QUEUE queueHead, void** data) {
|
||||
|
||||
entry = queueHead->head;
|
||||
queueHead->head = entry->next;
|
||||
queueHead->currentSize--;
|
||||
|
||||
*data = entry->data;
|
||||
|
||||
free(entry);
|
||||
|
||||
if (queueHead->head == NULL) {
|
||||
LC_ASSERT(queueHead->currentSize == 0);
|
||||
PltClearEvent(&queueHead->containsDataEvent);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user