bio: add bioShutdown function to prevent memory leaks

This commit implements the bioShutdown() function, which guarantees
a graceful shutdown of the background I/O subsystem. It destroys
worker mutexes, condition variables, releases job lists, and closes
the event loop synchronization pipes.

This ensures no resource leaks are left behind upon server exit.
This commit is contained in:
Alan 2026-07-10 10:31:02 +02:00
parent 323df5442c
commit cddec3c0e7

2
bio.c
View file

@ -12,6 +12,7 @@
* we'll switch to libeio. However there are probably long term uses for this
* file as we may want to put Redis specific background tasks here.
*
*
* DESIGN
* ------
*
@ -54,6 +55,7 @@ static char* bio_worker_title[] = {
"bio_lazy_free",
};
#define BIO_WORKER_NUM (sizeof(bio_worker_title) / sizeof(*bio_worker_title))
static unsigned int bio_job_to_worker[] = {