aboutsummaryrefslogtreecommitdiffstats
path: root/src/UpdateGlue.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2014-01-14 09:09:52 +0100
committerMax Kellermann <max@duempel.org>2014-01-14 09:09:52 +0100
commit5d17731b73bf485f8536fb6284ab32cdbb4789b0 (patch)
tree8e346eb989dc600344ae67461000c1beb676154f /src/UpdateGlue.cxx
parent07a7fde8253384d92fee70f061fc809e9bfa7544 (diff)
downloadmpd-5d17731b73bf485f8536fb6284ab32cdbb4789b0.tar.gz
mpd-5d17731b73bf485f8536fb6284ab32cdbb4789b0.tar.xz
mpd-5d17731b73bf485f8536fb6284ab32cdbb4789b0.zip
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.
Diffstat (limited to 'src/UpdateGlue.cxx')
-rw-r--r--src/UpdateGlue.cxx3
1 files changed, 3 insertions, 0 deletions
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 <assert.h>
@@ -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()) {