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 #12

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.

Fixes #11.

@notgull
Copy link
Member

notgull commented Mar 16, 2023

This looks good to me, but I'm not familiar enough with futures infrastructure to comment.

@taiki-e Does this look good to you?

Copy link
Collaborator

@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 4320c67 into smol-rs:master Mar 22, 2023
@notgull notgull mentioned this pull request Apr 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Use Waker::will_wake()
3 participants