From: Dave West Date: Wed, 5 Dec 2007 20:47:53 +0000 (+0000) Subject: The thread doing housekeeping now changes its name when doing X-Git-Tag: v7.86~2678 X-Git-Url: https://code.citadel.org/?a=commitdiff_plain;ds=sidebyside;h=5656627a804d561b14924df70f1e16deac6ff8fb;p=citadel.git The thread doing housekeeping now changes its name when doing housekeeping. --- diff --git a/citadel/housekeeping.c b/citadel/housekeeping.c index b0d4a1d26..901dd8ec8 100644 --- a/citadel/housekeeping.c +++ b/citadel/housekeeping.c @@ -139,6 +139,7 @@ void do_housekeeping(void) { int do_housekeeping_now = 0; int do_perminute_housekeeping_now = 0; time_t now; + const char *old_name; /* * We do it this way instead of wrapping the whole loop in an @@ -167,13 +168,16 @@ void do_housekeeping(void) { */ /* First, do the "as often as needed" stuff... */ + old_name = CtdlThreadName("House Keeping - Journal"); JournalRunQueue(); + CtdlThreadName("House Keeping - EVT_HOUSE"); PerformSessionHooks(EVT_HOUSE); /* perform as needed housekeeping */ /* Then, do the "once per minute" stuff... */ if (do_perminute_housekeeping_now) { cdb_check_handles(); /* suggested by Justin Case */ + CtdlThreadName("House Keeping - EVT_TIMER"); PerformSessionHooks(EVT_TIMER); /* Run any timer hooks */ } @@ -181,4 +185,5 @@ void do_housekeeping(void) { * All done. */ housekeeping_in_progress = 0; + CtdlThreadName(old_name); }