From cddec3c0e75e6f53066f5800a6b5158080c4e0ef Mon Sep 17 00:00:00 2001 From: Alan Date: Fri, 10 Jul 2026 10:31:02 +0200 Subject: [PATCH] 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. --- bio.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/bio.c b/bio.c index 46e5e3da5..43be4ec9b 100644 --- a/bio.c +++ b/bio.c @@ -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[] = {