Updating the LF MPMC queue and replacing DirQueue with it

Making the MPMC queue support when producers are consumers at the same
time by adding a variable work, mpmc_push_work() that increments work
and mpmc_task_done() that decrements work, and if work = 0 calls
mpmc_producers_finished() that pushes poinsons to wake up sleeping
threads and make them return NULL

Replacing DirQueue, a queue growable with realloc with the MPMC queue
This commit is contained in:
2026-03-11 17:48:36 +01:00
parent 0e3ec5b09c
commit 82e4eef3cb
5 changed files with 39 additions and 145 deletions

View File

@@ -37,3 +37,7 @@ Align the MPMC queue to pagesize
Getting file size from FindFirstFileA() instead of CreateFileA(), since we already call FindFirstFileA() and it returns the size there is no need to open/close every file to get it's size
Replacing Malloc and strdup in scan helper function with FileEntry and path arenas
Making the MPMC queue support when producers are consumers at the same time by adding a variable work, mpmc_push_work() that increments work and mpmc_task_done() that decrements work, and if work = 0 calls mpmc_producers_finished() that pushes poinsons to wake up sleeping threads and make them return NULL
Replacing DirQueue, a queue growable with realloc with the MPMC queue

Binary file not shown.