mirror of
https://github.com/redis/redis.git
synced 2026-07-16 13:32:51 -04:00
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:
parent
323df5442c
commit
cddec3c0e7
1 changed files with 2 additions and 0 deletions
2
bio.c
2
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[] = {
|
||||
|
|
|
|||
Loading…
Reference in a new issue