mirror of https://github.com/BOINC/boinc.git
*** empty log message ***
svn path=/trunk/boinc/; revision=5145
This commit is contained in:
parent
6df7ebc5e8
commit
dddb7e8ff3
|
@ -22962,3 +22962,14 @@ David 19 Jan 2005
|
|||
html/inc/
|
||||
profile.inc
|
||||
uotd.inc
|
||||
|
||||
David 19 Jan 2005
|
||||
- Change the logic in CLIENT_STATE::do_something to
|
||||
avoid unsuspending activities before starting them
|
||||
- change CLIENT_STATE::check_suspend_activities() from int to void
|
||||
|
||||
Checked these changes into boinc_public also
|
||||
|
||||
client/
|
||||
client_state.C,h
|
||||
cs_prefs.C
|
||||
|
|
|
@ -343,7 +343,7 @@ int CLIENT_STATE::net_sleep(double x) {
|
|||
// (in which case should call this again immediately)
|
||||
//
|
||||
bool CLIENT_STATE::do_something(double now) {
|
||||
int actions = 0, reason, retval;
|
||||
int actions = 0, suspend_reason, retval;
|
||||
SCOPE_MSG_LOG scope_messages(log_messages, CLIENT_MSG_LOG::DEBUG_POLL);
|
||||
static bool tasks_restarted = false;
|
||||
|
||||
|
@ -352,23 +352,38 @@ bool CLIENT_STATE::do_something(double now) {
|
|||
start_cpu_benchmarks();
|
||||
}
|
||||
|
||||
retval = check_suspend_activities(now, reason);
|
||||
if (!retval) {
|
||||
if (reason) {
|
||||
check_suspend_activities(now, suspend_reason);
|
||||
|
||||
// Restart tasks on startup.
|
||||
// Do this here (rather than CLIENT_STATE::init())
|
||||
// so that if we do benchmark on startup,
|
||||
// we don't immediately suspend apps
|
||||
// (this fixes a CPDN problem where quitting the app
|
||||
// right after start kills it)
|
||||
//
|
||||
if (!suspend_reason && !tasks_restarted) {
|
||||
restart_tasks();
|
||||
tasks_restarted = true;
|
||||
}
|
||||
|
||||
// suspend or resume activities (but only if already did startup)
|
||||
//
|
||||
if (tasks_restarted) {
|
||||
if (suspend_reason) {
|
||||
if (!activities_suspended) {
|
||||
suspend_activities(reason);
|
||||
suspend_activities(suspend_reason);
|
||||
}
|
||||
} else {
|
||||
if (activities_suspended) {
|
||||
resume_activities();
|
||||
}
|
||||
}
|
||||
activities_suspended = (reason != 0);
|
||||
activities_suspended = (suspend_reason != 0);
|
||||
}
|
||||
|
||||
// if we're doing CPU benchmarks, don't do much else
|
||||
//
|
||||
if (reason & SUSPEND_REASON_BENCHMARKS) {
|
||||
if (suspend_reason & SUSPEND_REASON_BENCHMARKS) {
|
||||
// wait for applications to become suspended
|
||||
//
|
||||
if (active_tasks.is_task_executing()) {
|
||||
|
@ -379,17 +394,17 @@ bool CLIENT_STATE::do_something(double now) {
|
|||
return gui_rpcs.poll(dtime());
|
||||
}
|
||||
|
||||
check_suspend_network(now, reason);
|
||||
if (reason) {
|
||||
check_suspend_network(now, suspend_reason);
|
||||
if (suspend_reason) {
|
||||
if (!network_suspended) {
|
||||
suspend_network(reason);
|
||||
suspend_network(suspend_reason);
|
||||
}
|
||||
} else {
|
||||
if (network_suspended) {
|
||||
resume_network();
|
||||
}
|
||||
}
|
||||
network_suspended = (reason != 0);
|
||||
network_suspended = (suspend_reason != 0);
|
||||
|
||||
scope_messages.printf("CLIENT_STATE::do_something(): Begin poll:\n");
|
||||
++scope_messages;
|
||||
|
@ -404,14 +419,6 @@ bool CLIENT_STATE::do_something(double now) {
|
|||
// in that order (active_tasks_poll() sets must_schedule_cpus,
|
||||
// and handle_finished_apps() must be done before schedule_cpus()
|
||||
|
||||
// restart tasks here so that if we do benchmark on startup,
|
||||
// we don't immediately suspend apps
|
||||
//
|
||||
if (!activities_suspended && !tasks_restarted) {
|
||||
restart_tasks();
|
||||
tasks_restarted = true;
|
||||
}
|
||||
|
||||
ss_logic.poll();
|
||||
if (activities_suspended) {
|
||||
scope_messages.printf("CLIENT_STATE::do_something(): activities suspended\n");
|
||||
|
|
|
@ -244,7 +244,7 @@ public:
|
|||
int allowed_disk_usage(double&);
|
||||
int allowed_project_disk_usage(double&);
|
||||
private:
|
||||
int check_suspend_activities(double, int&);
|
||||
void check_suspend_activities(double, int&);
|
||||
int suspend_activities(int reason);
|
||||
int resume_activities();
|
||||
void check_suspend_network(double, int&);
|
||||
|
|
|
@ -131,7 +131,7 @@ inline bool now_between_two_hours(int start_hour, int end_hour) {
|
|||
// See if (on the basis of user run request and prefs)
|
||||
// we should suspend activities.
|
||||
//
|
||||
int CLIENT_STATE::check_suspend_activities(double now, int& reason) {
|
||||
void CLIENT_STATE::check_suspend_activities(double now, int& reason) {
|
||||
static double last_time = 0;
|
||||
reason = 0;
|
||||
|
||||
|
@ -141,14 +141,14 @@ int CLIENT_STATE::check_suspend_activities(double now, int& reason) {
|
|||
reason |= SUSPEND_REASON_BENCHMARKS;
|
||||
}
|
||||
|
||||
if (user_run_request == USER_RUN_REQUEST_ALWAYS) return 0;
|
||||
if (user_run_request == USER_RUN_REQUEST_ALWAYS) return;
|
||||
|
||||
if (user_run_request == USER_RUN_REQUEST_NEVER) {
|
||||
reason |= SUSPEND_REASON_USER_REQ;
|
||||
return 0;
|
||||
return;
|
||||
}
|
||||
|
||||
if (now - last_time < 5.0) return 1;
|
||||
if (now - last_time < 5.0) return;
|
||||
last_time = now;
|
||||
|
||||
if (!global_prefs.run_on_batteries
|
||||
|
@ -168,8 +168,6 @@ int CLIENT_STATE::check_suspend_activities(double now, int& reason) {
|
|||
if (!now_between_two_hours(global_prefs.start_hour, global_prefs.end_hour)) {
|
||||
reason |= SUSPEND_REASON_TIME_OF_DAY;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int CLIENT_STATE::suspend_activities(int reason) {
|
||||
|
|
|
@ -20,18 +20,18 @@ and then for each selected project:
|
|||
</ul>
|
||||
|
||||
<p>
|
||||
If the user chooses N projects,
|
||||
If the participant chooses N projects,
|
||||
there are N forms to fill out,
|
||||
N emails to handle, and N dialog interactions with the BOINC client.
|
||||
This is tedious if there are lots of projects.
|
||||
Furthermore, it involves cutting and pasting long random strings,
|
||||
which is intimidating to some users.
|
||||
which is intimidating to some participants.
|
||||
|
||||
<p>
|
||||
This document describes BOINC's support for <b>account management systems</b>,
|
||||
which streamline the process of finding and joining BOINC projects.
|
||||
A typical account management system is implemented as a web site.
|
||||
The user experience is:
|
||||
The participant experience is:
|
||||
<ul>
|
||||
<li> Visit the account manager site,
|
||||
set up a 'meta-account' (name, email, password),
|
||||
|
@ -63,7 +63,7 @@ causing the account to be marked as 'confirmed'.
|
|||
with a <b>query account</b> RPC,
|
||||
waiting for all accounts to become confirmed.
|
||||
<li> When all accounts are confirmed,
|
||||
the user downloads and installs the BOINC client software
|
||||
the participant downloads and installs the BOINC client software
|
||||
from the account manager.
|
||||
The install package includes a file
|
||||
(specific to this account manager)
|
||||
|
@ -85,9 +85,9 @@ The underlying protocol of both mechanisms is as follows:
|
|||
<ul>
|
||||
<li> Each RPC is an HTTP POST transaction.
|
||||
<li> The request and reply messages are strings of the form
|
||||
<pre>
|
||||
".html_text("
|
||||
param1=val1¶m2=val2&...¶mn=valn
|
||||
</pre>
|
||||
")."
|
||||
there param1 ... paramN are the input or output parameter names,
|
||||
and val1 ... valn are the values.
|
||||
All values are URL-encoded using the PHP urlencode() function.
|
||||
|
@ -120,7 +120,7 @@ To confirm your participation in [project name] please visit the following URL:
|
|||
|
||||
If you do not want to participate in [project name], just ignore this message.
|
||||
</pre>
|
||||
When the user visits xxx, the account is confirmed.
|
||||
When the participant visits xxx, the account is confirmed.
|
||||
");
|
||||
list_end();
|
||||
|
||||
|
|
|
@ -43,6 +43,7 @@ htmlspecialchars("
|
|||
[ <enforce_delay_bound/> ]
|
||||
[ <locality_scheduling/> ]
|
||||
[ <locality_scheduling_wait_period> N </locality_scheduling_wait_period> ]
|
||||
[ <min_core_client_version> N </min_core_client_version ]
|
||||
|
||||
<!-- optional; defaults as indicated: -->
|
||||
<project_dir> ../ </project_dir> <!-- relative to location of 'start' -->
|
||||
|
@ -188,6 +189,11 @@ list_item("locality_scheduling_wait_period",
|
|||
scripts this can be used for 'just-in-time' workunit
|
||||
creation. See <a href=sched_locality.php>Scheduling Locality</a>."
|
||||
);
|
||||
list_item("min_core_client_version",
|
||||
"If the scheduler gets a request from a client with
|
||||
a version number less than this,
|
||||
it returns an error message and doesn't do any other processing."
|
||||
);
|
||||
|
||||
list_end();
|
||||
|
||||
|
|
Loading…
Reference in New Issue