From 8a69bf0c57ebd99aa225d0a6555df03c0d2bc42a Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Fri, 19 Jan 2024 14:09:42 +0100 Subject: [PATCH] manager: order idle jobs Let's put the run queue really the last spot, as we should only start doing more work if we really have nothing else to do anymore. Let's move the service watchdog after the rewatch PID logic for similar logic: it will possibly result in new jobs being enqueued to stop things, and we should really have done all other work first. --- src/core/manager.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/manager.h b/src/core/manager.h index 8962c5c66e7..ba7c1e28c93 100644 --- a/src/core/manager.h +++ b/src/core/manager.h @@ -662,7 +662,7 @@ enum { EVENT_PRIORITY_TIME_ZONE = SD_EVENT_PRIORITY_NORMAL-1, EVENT_PRIORITY_IPC = SD_EVENT_PRIORITY_NORMAL, EVENT_PRIORITY_REWATCH_PIDS = SD_EVENT_PRIORITY_IDLE, - EVENT_PRIORITY_RUN_QUEUE = SD_EVENT_PRIORITY_IDLE, - EVENT_PRIORITY_SERVICE_WATCHDOG = SD_EVENT_PRIORITY_IDLE, + EVENT_PRIORITY_SERVICE_WATCHDOG = SD_EVENT_PRIORITY_IDLE+1, + EVENT_PRIORITY_RUN_QUEUE = SD_EVENT_PRIORITY_IDLE+2, /* … to least important */ }; -- 2.47.3