From c382cfca25c456cda70dd26fbdf7feda8aabeed3 Mon Sep 17 00:00:00 2001 From: Daniel Hsu Date: Wed, 14 Jul 2004 18:28:07 +0000 Subject: [PATCH] *** empty log message *** svn path=/trunk/boinc/; revision=3872 --- checkin_notes | 8 ++++++++ client/cs_apps.C | 15 +++++++++++---- 2 files changed, 19 insertions(+), 4 deletions(-) diff --git a/checkin_notes b/checkin_notes index 9f8ccc33f3..e1c08ec687 100755 --- a/checkin_notes +++ b/checkin_notes @@ -15208,3 +15208,11 @@ David 13 July 2004 gui_rpc_client.C,h gui_rpc_server.C gui_test.C + +Daniel 2004-07-14 + - schedule_cpus() now returns false if no projects had runnable + results. this should behave more nicely with do_something(). + + client/ + cs_apps.C + diff --git a/client/cs_apps.C b/client/cs_apps.C index 6b43391dac..878221b194 100644 --- a/client/cs_apps.C +++ b/client/cs_apps.C @@ -458,13 +458,20 @@ bool CLIENT_STATE::schedule_cpus(bool must_reschedule) { cpu_sched_work_done_this_period = 0; cpu_sched_last_time = time(0); - if (total_resource_share > 0.0) { - set_client_state_dirty("schedule_cpus"); - } if (some_app_started) { app_started = cpu_sched_last_time; } - return true; + + // debts and active_tasks can only change if some project had + // a runnable result (and thus if total_resource_share + // is positive) + // + if (total_resource_share > 0.0) { + set_client_state_dirty("schedule_cpus"); + return true; + } else { + return false; + } } // This is called when the client is initialized.