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.