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

Always check available() in InputPumper to avoid burning CPU #4095

Merged
merged 2 commits into from
Dec 10, 2024

Conversation

lihaoyi
Copy link
Member

@lihaoyi lihaoyi commented Dec 9, 2024

Attempts to fix #4092

Instead of checking src.available() == 0, we check for src.read(buffer) == 0, which should provide a more accurate measure

@lihaoyi lihaoyi merged commit 1eb4a04 into com-lihaoyi:main Dec 10, 2024
27 checks passed
@lefou lefou added this to the 0.12.4 milestone Dec 10, 2024
lihaoyi added a commit to lihaoyi/mill-1 that referenced this pull request Dec 18, 2024
lihaoyi added a commit that referenced this pull request Dec 18, 2024
…CPU (#4095)" (#4159)

Fixes #4158

This hits some JVM limitations that significantly slow down the process
exit, unnecessarily. Added a comment to the code so we don't forget
again
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