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

Use Waker::will_wake() to avoid a cloning op #2723

Merged
merged 1 commit into from
Mar 22, 2023

Conversation

daxpedda
Copy link
Contributor

This uses Waker::will_wake() to check if the old waker will awaken the same task as the new one, which could save a clone operation.

This is analogous to smol-rs/atomic-waker#12.

@daxpedda daxpedda requested a review from taiki-e as a code owner March 18, 2023 12:35
Copy link
Member

@taiki-e taiki-e left a comment

Choose a reason for hiding this comment

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

Thanks!

@taiki-e taiki-e merged commit cc0e342 into rust-lang:master Mar 22, 2023
@taiki-e taiki-e added the 0.3-backport: pending The maintainer accepted to backport this to the 0.3 branch, but backport has not been done yet. label Mar 22, 2023
@taiki-e taiki-e mentioned this pull request Mar 30, 2023
@taiki-e taiki-e added 0.3-backport: completed and removed 0.3-backport: pending The maintainer accepted to backport this to the 0.3 branch, but backport has not been done yet. labels Mar 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants