From 5778a5316c9f5500b92be1a15a0e566271ff14a1 Mon Sep 17 00:00:00 2001 From: askv Date: Thu, 9 Sep 2010 23:49:24 -0700 Subject: [PATCH] set some threads to THREAD_PRIORITY_LOW --- rtengine/improccoordinator.cc | 4 ++-- rtengine/updater.cc | 4 ++-- rtgui/crophandler.cc | 2 +- rtgui/thumbimageupdater.cc | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/rtengine/improccoordinator.cc b/rtengine/improccoordinator.cc index e79fefb5f..a2772b54d 100644 --- a/rtengine/improccoordinator.cc +++ b/rtengine/improccoordinator.cc @@ -504,7 +504,7 @@ void ImProcCoordinator::stopProcessing () { void ImProcCoordinator::startProcessing () { - #undef THREAD_PRIORITY_NORMAL + #undef THREAD_PRIORITY_LOW if (!destroying) { updaterThreadStart.lock (); @@ -512,7 +512,7 @@ void ImProcCoordinator::startProcessing () { thread = NULL; updaterRunning = true; updaterThreadStart.unlock (); - thread = Glib::Thread::create(sigc::mem_fun(*this, &ImProcCoordinator::process), 0, false, true, Glib::THREAD_PRIORITY_NORMAL); + thread = Glib::Thread::create(sigc::mem_fun(*this, &ImProcCoordinator::process), 0, false, true, Glib::THREAD_PRIORITY_LOW); } else updaterThreadStart.unlock (); diff --git a/rtengine/updater.cc b/rtengine/updater.cc index 5a0b5a3b6..b0ff8f433 100644 --- a/rtengine/updater.cc +++ b/rtengine/updater.cc @@ -54,13 +54,13 @@ ProcParams* Updater::getParams () { void Updater::startProcessing () { - #undef THREAD_PRIORITY_NORMAL + #undef THREAD_PRIORITY_LOW tstart.lock (); if (ipc && !running) { running = true; tstart.unlock (); - Glib::Thread::create(sigc::mem_fun(*this, &Updater::process), 0, false, true, Glib::THREAD_PRIORITY_NORMAL); + Glib::Thread::create(sigc::mem_fun(*this, &Updater::process), 0, false, true, Glib::THREAD_PRIORITY_LOW); } else tstart.unlock (); diff --git a/rtgui/crophandler.cc b/rtgui/crophandler.cc index b30474cec..d08bd4782 100644 --- a/rtgui/crophandler.cc +++ b/rtgui/crophandler.cc @@ -268,7 +268,7 @@ void CropHandler::update () { // crop->setWindow (cropX, cropY, cropW, cropH, zoom>=1000 ? 1 : zoom); --> we use the "getWindow" hook instead of setting the size before crop->setListener (this); cropPixbuf.clear (); - Glib::Thread::create(sigc::mem_fun(*crop, &DetailedCrop::fullUpdate), 0, false, true, Glib::THREAD_PRIORITY_NORMAL); + Glib::Thread::create(sigc::mem_fun(*crop, &DetailedCrop::fullUpdate), 0, false, true, Glib::THREAD_PRIORITY_LOW); } } diff --git a/rtgui/thumbimageupdater.cc b/rtgui/thumbimageupdater.cc index b4c81d98a..78d7ece01 100644 --- a/rtgui/thumbimageupdater.cc +++ b/rtgui/thumbimageupdater.cc @@ -88,7 +88,7 @@ void ThumbImageUpdater::process_ () { Job current = *i; jqueue.erase (i); if (current.listener) - threadPool[threads] = Glib::Thread::create(sigc::bind(sigc::mem_fun(*this, &ThumbImageUpdater::processJob), current), 0, true, true, Glib::THREAD_PRIORITY_NORMAL); + threadPool[threads] = Glib::Thread::create(sigc::bind(sigc::mem_fun(*this, &ThumbImageUpdater::processJob), current), 0, true, true, Glib::THREAD_PRIORITY_LOW); else threadPool[threads] = NULL; }