From 5d17731b73bf485f8536fb6284ab32cdbb4789b0 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 14 Jan 2014 09:09:52 +0100 Subject: UpdateGlue: let the update thread run at "idle" priority The update thread should not affect the rest of the system, therefore set "idle" priority, and let it only run when nobody else is using the resources. --- src/UpdateGlue.cxx | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/UpdateGlue.cxx') diff --git a/src/UpdateGlue.cxx b/src/UpdateGlue.cxx index 72938018a..29e5f3ca7 100644 --- a/src/UpdateGlue.cxx +++ b/src/UpdateGlue.cxx @@ -34,6 +34,7 @@ #include "system/FatalError.hxx" #include "thread/Id.hxx" #include "thread/Thread.hxx" +#include "thread/Util.hxx" #include @@ -68,6 +69,8 @@ update_task(gcc_unused void *ctx) else LogDebug(update_domain, "starting"); + SetThreadIdlePriority(); + modified = update_walk(next.path_utf8.c_str(), next.discard); if (modified || !db_exists()) { -- cgit v1.2.3