set some threads to THREAD_PRIORITY_LOW

This commit is contained in:
askv 2010-09-09 23:49:24 -07:00
parent 609213fb57
commit 5778a5316c
4 changed files with 6 additions and 6 deletions

View File

@ -504,7 +504,7 @@ void ImProcCoordinator::stopProcessing () {
void ImProcCoordinator::startProcessing () { void ImProcCoordinator::startProcessing () {
#undef THREAD_PRIORITY_NORMAL #undef THREAD_PRIORITY_LOW
if (!destroying) { if (!destroying) {
updaterThreadStart.lock (); updaterThreadStart.lock ();
@ -512,7 +512,7 @@ void ImProcCoordinator::startProcessing () {
thread = NULL; thread = NULL;
updaterRunning = true; updaterRunning = true;
updaterThreadStart.unlock (); 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 else
updaterThreadStart.unlock (); updaterThreadStart.unlock ();

View File

@ -54,13 +54,13 @@ ProcParams* Updater::getParams () {
void Updater::startProcessing () { void Updater::startProcessing () {
#undef THREAD_PRIORITY_NORMAL #undef THREAD_PRIORITY_LOW
tstart.lock (); tstart.lock ();
if (ipc && !running) { if (ipc && !running) {
running = true; running = true;
tstart.unlock (); 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 else
tstart.unlock (); tstart.unlock ();

View File

@ -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->setWindow (cropX, cropY, cropW, cropH, zoom>=1000 ? 1 : zoom); --> we use the "getWindow" hook instead of setting the size before
crop->setListener (this); crop->setListener (this);
cropPixbuf.clear (); 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);
} }
} }

View File

@ -88,7 +88,7 @@ void ThumbImageUpdater::process_ () {
Job current = *i; Job current = *i;
jqueue.erase (i); jqueue.erase (i);
if (current.listener) 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 else
threadPool[threads] = NULL; threadPool[threads] = NULL;
} }