Skip to content

Conversation

@rli
Copy link
Contributor

@rli rli commented Oct 25, 2024

yield() in while-loop is effectively a busy loop and wastes CPU time

#5000

License

I confirm that my contribution is made under the terms of the Apache 2.0 license.

@rli rli requested a review from a team as a code owner October 25, 2024 17:42
@Will-ShaoHua Will-ShaoHua self-requested a review October 25, 2024 17:49
@github-actions
Copy link

github-actions bot commented Oct 25, 2024

Qodana Community for JVM

It seems all right 👌

No new problems were found according to the checks applied

💡 Qodana analysis was run in the pull request mode: only the changed files were checked
☁️ View the detailed Qodana report

Contact Qodana team

Contact us at [email protected]

}

// TODO: need better solution for this
@Suppress("LoopWithTooManyJumpStatements")
Copy link
Contributor Author

Choose a reason for hiding this comment

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

context team to follow up with better solution

@rli rli merged commit 987e2ae into main Oct 28, 2024
15 of 17 checks passed
@rli rli deleted the rli/busy branch October 28, 2024 17:38
@rli rli changed the title Break out of loop when context process has started Don't yield in tight loop when context process hasn't started Oct 28, 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.

4 participants