[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    branches/work/icecream-make-it-cool/daemon
From:       Dirk Mueller <mueller () kde ! org>
Date:       2006-08-31 22:10:03
Message-ID: 1157062203.177137.5331.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 579360 by mueller:

don't assign jobs if we're currently busy. reduces
impact on a machine due to job preloading.


 M  +4 -3      main.cpp  


--- branches/work/icecream-make-it-cool/daemon/main.cpp #579359:579360
@@ -266,7 +266,7 @@
     }
 };
 
-int dcc_new_pgrp(void)
+static int set_new_pgrp(void)
 {
     /* If we're a session group leader, then we are not able to call
      * setpgid().  However, setsid will implicitly have put us into a new
@@ -734,7 +734,8 @@
 
 void Daemon::handle_old_request()
 {
-    while ( current_kids + clients.active_processes < max_kids ) {
+    while ( current_load < 1000
+            && current_kids + clients.active_processes < max_kids ) {
 
         Client *client = clients.get_earliest_client(Client::LINKJOB);
         if ( client ) {
@@ -1390,7 +1391,7 @@
 
     /* Still create a new process group, even if not detached */
     trace() << "not detaching\n";
-    if ((ret = dcc_new_pgrp()) != 0)
+    if ((ret = set_new_pgrp()) != 0)
         return ret;
 
     /* Don't catch signals until we've detached or created a process group. */
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic