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

Prevent wasteful busy cpu spinning #1045

Merged
merged 2 commits into from
Feb 23, 2024
Merged

Conversation

permosegaard
Copy link
Contributor

First of all, I'd like to say a huge thankyou for your work on cargo-make, it's replaced all of my previous make workflows!

Now, this pull request may seem rediculous, however the unstable ctrl-c implementation in it's current form
will busy loop a whole cpu core while it's running, impacting performance, battery life, etc.

There's probably a better way to approach this, but as a simple fix I have added a minimal sleep to the loop.

Happy to sign away any rights to the provided code, etc.

@sagiegurari
Copy link
Owner

@permosegaard thanks! looks good and i have to admit, i didn't write the original code so i'm not sure and don't think there is an issue with it

Copy link

codecov bot commented Feb 23, 2024

Codecov Report

Attention: Patch coverage is 0% with 1 lines in your changes are missing coverage. Please review.

Project coverage is 92.89%. Comparing base (3bb9729) to head (911d56d).

Files Patch % Lines
src/lib/command.rs 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1045      +/-   ##
==========================================
- Coverage   92.90%   92.89%   -0.01%     
==========================================
  Files         118      118              
  Lines       24220    24221       +1     
==========================================
  Hits        22501    22501              
- Misses       1719     1720       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@sagiegurari
Copy link
Owner

@permosegaard can you please rebase? i think i solved the build errors already in master

@permosegaard
Copy link
Contributor Author

I should be up-to-date with your master now, shout if you need any more changes :)

@sagiegurari sagiegurari merged commit a61f87a into sagiegurari:master Feb 23, 2024
12 of 14 checks passed
@sagiegurari
Copy link
Owner

@permosegaard merged, thanks.

sagiegurari added a commit that referenced this pull request Feb 23, 2024
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