-
-
Notifications
You must be signed in to change notification settings - Fork 26.5k
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
Fix busy-waiting loops #2977
Comments
shree243
added a commit
to shree243/java-design-patterns
that referenced
this issue
Jun 18, 2024
i am new here, i want to contribute to this project |
Hello, i'm available to work on it |
Thanks, I've just started working on this. |
This issue has been automatically marked as stale because it has not had recent activity. The issue will be unassigned if no further activity occurs. Thank you for your contributions. |
stale
bot
added
the
status: stale
issues and pull requests that have not had recent interaction
label
Sep 11, 2024
Hello, this is my first time in open source. |
stale
bot
removed
the
status: stale
issues and pull requests that have not had recent interaction
label
Oct 1, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description
Busy-waiting, or spinning, is a technique where a process repeatedly checks to see if a condition is true, such as whether keyboard input or a lock is available. While it might seem like a good idea, it has several significant drawbacks:
Instead of busy-waiting, it's generally better to use some form of event-driven programming or blocking. This allows your process to sleep until the condition it's waiting for becomes true, which can save CPU time, improve performance, and make your application more responsive.
Busy-waiting loops are at least in these locations:
Acceptance Criteria
The text was updated successfully, but these errors were encountered: