Permalink
Browse files

o Make sure to not eat foreground CPU.

  • Loading branch information...
1 parent d810489 commit eb5495dfd72282510fac9f482545a926298bc719 @hzeller committed Oct 11, 2012
Showing with 4 additions and 0 deletions.
  1. +4 −0 util.cc
View
@@ -97,5 +97,9 @@ folve::Thread::~Thread() {
void folve::Thread::Start() {
assert(!started_);
pthread_create(&thread_, NULL, &PthreadCallRun, this);
+ // Background thread:
+ struct sched_param p;
+ p.sched_priority = 0;
+ pthread_setschedparam(thread_, SCHED_IDLE, &p);
started_ = true;
}

0 comments on commit eb5495d

Please sign in to comment.