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

Fixes #281 #300

Merged
merged 1 commit into from
Aug 27, 2024
Merged

Fixes #281 #300

merged 1 commit into from
Aug 27, 2024

Conversation

lesquoyb
Copy link
Contributor

makes the main thread sleep during the infinite loop so the cpu can be used to do something else

makes the main thread sleep during the infinite loop so the cpu can be used to do something else
Copy link

@codescene-delta-analysis codescene-delta-analysis bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Health Quality Gates: OK

Change in average Code Health of affected files: +0.00 (8.28 -> 8.28)

View detailed results in CodeScene

Copy link
Member

@hqnghi88 hqnghi88 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it obviously should be only the sleep, without the while true

@lesquoyb
Copy link
Contributor Author

I still like the idea of letting the program come back to the main thread from time to time because it may be needed for some things we are not aware of.
In that case it'll come back to the main thread every 999 seconds which we can safely guess won't have much impact on global performance.

But if you're sure it's not needed we can get rid of that loop and use max_long as duration for the sleep

@hqnghi88
Copy link
Member

Yes, you are right, got your idea on "wake up at night" :)

@hqnghi88 hqnghi88 merged commit 771e2cd into 2024-06 Aug 27, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants