mirror of
https://github.com/moonlight-stream/moonlight-common-c.git
synced 2025-08-17 08:55:48 +00:00
Fix size tracking in LBQ
This commit is contained in:
parent
638787d3dd
commit
b5430217dd
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user