-
Notifications
You must be signed in to change notification settings - Fork 111
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
cleanup(consensus): Avoid blocking threads by awaiting proof verification results from rayon in async context #6887
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
Let's try to merge this PR a while before a release, so it gets time on the |
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code looks good, thanks!
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
@Mergifyio update |
✅ Branch has been successfully updated |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is good to go!
Looks like mergify is waiting for the But that patch job actually ran: I can't work out what went wrong here, so I'm going to re-try running the patch job. |
@Mergifyio refresh |
✅ Pull request refreshed |
@Mergifyio refresh |
✅ Pull request refreshed |
Motivation
This PR updates
verify_single_spawning()
andflush_spawning()
methods to delegate CPU-bound work using rayon instead of blocking tokio threads.rayon::iter::once
admits no parallelism on its own and will execute operations on the current thread if collected without being chained to another parallel iterator.Depends-On: #7158
Solution
tokio::spawn_blocking()
calls with oneshot channels andrayon::spawn_fifo()
Review
Anyone can review.
Reviewer Checklist