gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r9067 - gnunet/src/util


From: gnunet
Subject: [GNUnet-SVN] r9067 - gnunet/src/util
Date: Thu, 1 Oct 2009 17:41:21 -0600

Author: grothoff
Date: 2009-10-01 17:41:19 -0600 (Thu, 01 Oct 2009)
New Revision: 9067

Modified:
   gnunet/src/util/scheduler.c
Log:
better

Modified: gnunet/src/util/scheduler.c
===================================================================
--- gnunet/src/util/scheduler.c 2009-10-01 23:40:35 UTC (rev 9066)
+++ gnunet/src/util/scheduler.c 2009-10-01 23:41:19 UTC (rev 9067)
@@ -512,20 +512,24 @@
       GNUNET_NETWORK_fdset_zero (rs);
       GNUNET_NETWORK_fdset_zero (ws);
       timeout = GNUNET_TIME_relative_get_forever();
+      update_sets (&sched, rs, ws, &timeout);
       if (sched.ready_count > 0)
         {
           /* no blocking, more work already ready! */
           timeout = GNUNET_TIME_relative_get_zero();
         }
-      update_sets (&sched, rs, ws, &timeout);
       ret = GNUNET_NETWORK_socket_select (rs, ws, NULL, timeout);
       if (last_tr == sched.tasks_run)
-       busy_wait_warning++;
+       {
+         busy_wait_warning++;
+       }
       else
-       last_tr = sched.tasks_run;
+       {
+         last_tr = sched.tasks_run;
+         busy_wait_warning = 0;
+       }
       if ( (ret == 0) &&
           (timeout.value == 0) &&
-          (sched.ready_count == 0) &&
           (busy_wait_warning > 16) )
        {
          GNUNET_log (GNUNET_ERROR_TYPE_WARNING,





reply via email to

[Prev in Thread] Current Thread [Next in Thread]