6 Feb
2025
6 Feb
'25
10:01 a.m.
Nikolay Sivov (@nsivov) commented about dlls/rtworkq/queue.c:
+} + +static struct async_result *async_result_cache_pop(void) +{ + struct async_result *result; + struct list *head; + + if (list_empty(&async_result_cache)) + return NULL; + + EnterCriticalSection(&async_result_cache_section); + + if ((head = list_head(&async_result_cache))) + list_remove(head); + + LeaveCriticalSection(&async_result_cache_section); Do we need the empty check? Especially outside of the lock.
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/7244#note_93848