Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Client] Correct limit check in throttler thread #5186

Merged
merged 2 commits into from
Apr 10, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion client/app.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1254,7 +1254,8 @@ void* throttler(void*) {
while (1) {
client_mutex.lock();
double limit = gstate.current_cpu_usage_limit();
if (gstate.tasks_suspended || limit == 0) {
const double CPU_USAGE_UNLIMITED = 99.99;
if (gstate.tasks_suspended || limit >= CPU_USAGE_UNLIMITED) {
client_mutex.unlock();
// ::Sleep((int)(1000*10)); // for Win debugging
boinc_sleep(10);
Expand Down