mirror of https://github.com/BOINC/boinc.git
*** empty log message ***
svn path=/trunk/boinc/; revision=4319
This commit is contained in:
parent
35fbdcc866
commit
470da41c87
|
@ -450,11 +450,15 @@ static void on_timer(int a) {
|
|||
}
|
||||
}
|
||||
|
||||
// see if the core client has died, and we need to die too
|
||||
// see if the core client has died, which means we need to die too
|
||||
//
|
||||
if (options.check_heartbeat && heartbeat_active) {
|
||||
if (heartbeat_giveup_time < dtime()) {
|
||||
fprintf(stderr, "No heartbeat from core client - exiting\n");
|
||||
double now = dtime();
|
||||
if (heartbeat_giveup_time < now) {
|
||||
fprintf(stderr,
|
||||
"No heartbeat from core client for %f sec - exiting\n",
|
||||
now - (heartbeat_giveup_time - HEARTBEAT_GIVEUP_PERIOD);
|
||||
);
|
||||
if (options.direct_process_action) {
|
||||
exit(0);
|
||||
} else {
|
||||
|
|
|
@ -18313,3 +18313,18 @@ David 12 Oct 2004
|
|||
user/
|
||||
edit_forum_preferences_action.php
|
||||
edit_forum_preferences_form.php
|
||||
|
||||
David 12 Oct 2004
|
||||
- API: more detailed message when do heartbeat giveup
|
||||
- remove CLIENT_STATE::previous_activities_suspended
|
||||
- changed work fetch policy to get T work, not 2T
|
||||
- don't handle SIGTSTP and SIGCONT
|
||||
|
||||
api/
|
||||
boinc_api.C
|
||||
client/
|
||||
client_state.C,h
|
||||
cs_scheduler.C
|
||||
main.C
|
||||
win/
|
||||
wingui_mainwindow.cpp
|
||||
|
|
|
@ -79,7 +79,6 @@ CLIENT_STATE::CLIENT_STATE() {
|
|||
contacted_sched_server = false;
|
||||
activities_suspended = false;
|
||||
network_suspended = false;
|
||||
previous_activities_suspended = false;
|
||||
core_client_major_version = BOINC_MAJOR_VERSION;
|
||||
core_client_minor_version = BOINC_MINOR_VERSION;
|
||||
platform_name = HOSTTYPE;
|
||||
|
@ -353,7 +352,6 @@ bool CLIENT_STATE::do_something() {
|
|||
resume_activities();
|
||||
}
|
||||
}
|
||||
previous_activities_suspended = activities_suspended;
|
||||
activities_suspended = (reason != 0);
|
||||
|
||||
// if we're doing CPU benchmarks, don't do much else
|
||||
|
|
|
@ -118,9 +118,6 @@ public:
|
|||
int sched_retry_delay_min, sched_retry_delay_max;
|
||||
int pers_retry_delay_min, pers_retry_delay_max, pers_giveup;
|
||||
bool activities_suspended;
|
||||
bool previous_activities_suspended;
|
||||
// if activities were suspended in the previous check_suspend();
|
||||
// this is needed to update GUI windows after suspension and close transfers/files.
|
||||
bool network_suspended;
|
||||
bool executing_as_windows_service;
|
||||
bool size_overflow;
|
||||
|
|
|
@ -425,7 +425,8 @@ int CLIENT_STATE::compute_work_requests() {
|
|||
//
|
||||
p->work_request =
|
||||
max(0.0,
|
||||
(2*work_min_period - estimated_time_to_starvation)
|
||||
//(2*work_min_period - estimated_time_to_starvation)
|
||||
(work_min_period - estimated_time_to_starvation)
|
||||
* avg_proc_rate(p)
|
||||
);
|
||||
}
|
||||
|
|
|
@ -245,8 +245,8 @@ int boinc_main_loop(int argc, char** argv) {
|
|||
#ifdef SIGPWR
|
||||
boinc_set_signal_handler(SIGPWR, signal_handler);
|
||||
#endif
|
||||
boinc_set_signal_handler_force(SIGTSTP, signal_handler);
|
||||
boinc_set_signal_handler_force(SIGCONT, signal_handler);
|
||||
//boinc_set_signal_handler_force(SIGTSTP, signal_handler);
|
||||
//boinc_set_signal_handler_force(SIGCONT, signal_handler);
|
||||
#endif
|
||||
|
||||
// Windows console controls
|
||||
|
|
|
@ -2151,9 +2151,7 @@ void CMainWindow::OnTimer(UINT uEventID) {
|
|||
gstate.trunc_stderr_stdout();
|
||||
}
|
||||
|
||||
if (!gstate.activities_suspended || !gstate.previous_activities_suspended) {
|
||||
UpdateGUI(&gstate);
|
||||
}
|
||||
UpdateGUI(&gstate);
|
||||
|
||||
// Start the timer again
|
||||
m_nGuiTimerID = SetTimer(GUI_TIMER, GUI_WAIT, (TIMERPROC) NULL);
|
||||
|
|
|
@ -8,13 +8,10 @@ Graphics are displayed either in an application window
|
|||
or in a full-screen window (when acting as a screensaver).
|
||||
Applications that provide graphics must call
|
||||
<pre>
|
||||
void boinc_init_graphics();
|
||||
void boinc_init_graphics(void (*worker)());
|
||||
</pre>
|
||||
at the start and
|
||||
<pre>
|
||||
void boinc_finish_graphics();
|
||||
</pre>
|
||||
prior to exiting.
|
||||
where <code>worker()</code> is the main function of your application.
|
||||
|
||||
<h3>Static graphics</h3>
|
||||
<p>
|
||||
An application can display a pre-existing image file
|
||||
|
@ -30,17 +27,15 @@ name of the file each time.
|
|||
|
||||
<h3>Dynamic graphics</h3>
|
||||
<p>
|
||||
The main application thread is called the <b>worker thread</b>.
|
||||
<code>boinc_init_graphics()</code> creates a second thread,
|
||||
called the <b>graphics thread</b>.
|
||||
<code>boinc_init_graphics()</code> creates a <b>worker thread</b>
|
||||
that runs the main application function.
|
||||
The original thread becomes the <b>graphics thread</b>,
|
||||
which handles GUI events and does rendering.
|
||||
The two threads communicate through application-defined
|
||||
shared memory structures.
|
||||
Typically these structures contain information about the computation,
|
||||
which is used to generate graphics.
|
||||
<br>
|
||||
<img vspace=10 src=graphics.png>
|
||||
<br>
|
||||
The worker must initialize the shared data structure
|
||||
You must initialize the shared data structure
|
||||
before calling <code>boinc_init_graphics()</code>.
|
||||
<p>
|
||||
Graphical applications must supply the following functions:
|
||||
|
@ -50,7 +45,7 @@ Graphical applications must supply the following functions:
|
|||
This will be called periodically in the graphics thread.
|
||||
It should generate the current graphic.
|
||||
<code>xs</code> and <code>ys</code> are the X and Y sizes of the window,
|
||||
and <tt>time_of_day</tt> is the relative time in seconds.
|
||||
and <code>time_of_day</code> is the relative time in seconds.
|
||||
The function should return true if it actually drew anything.
|
||||
It can refer to the user name, CPU time etc. obtained from
|
||||
<code>boinc_get_init_data()</code>.
|
||||
|
|
Loading…
Reference in New Issue