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

Changing task::block_on to park after a single poll #684

Merged
1 commit merged into from
Jan 20, 2020

Conversation

spacekookie
Copy link
Contributor

This was previously discussed in #605 and others as a source of high
CPU load when sleeping tasks because of the overhead created by
retrying a future in short succession.

Personally I've noticed this behaviour as well, but wasn't able to
recreate test settings since making this change yet. Maybe someone
else has some good benchmarks to run.

@spacekookie spacekookie requested a review from a user January 19, 2020 06:08
Copy link

@ghost ghost left a comment

Choose a reason for hiding this comment

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

Looks like there's an unused import of std::thread that makes CI fail; other than that looks good to me! :)

This was previously discussed in async-rs#605 and others as a source of high
CPU load when sleeping tasks because of the overhead created by
retrying a future in short succession.
@spacekookie
Copy link
Contributor Author

spacekookie commented Jan 20, 2020 via email

Copy link

@ghost ghost left a comment

Choose a reason for hiding this comment

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

Perfect, thanks!

@ghost ghost merged commit 81aa6d1 into async-rs:master Jan 20, 2020
@spacekookie spacekookie deleted the immediate-parking branch January 21, 2020 01:04
This pull request was closed.
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.

None yet

1 participant