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() #11

Closed
daxpedda opened this issue Mar 15, 2023 · 1 comment · Fixed by #12
Closed

Use Waker::will_wake() #11

daxpedda opened this issue Mar 15, 2023 · 1 comment · Fixed by #12

Comments

@daxpedda
Copy link
Contributor

I was wondering if there is any interest in adding this optimization, basically avoiding cloning the Waker if it isn't necessary.

Happy to make a PR.

@notgull
Copy link
Member

notgull commented Mar 15, 2023

Looking through the history of the original AtomicWaker implementation, it looks like it originally had a test like this, but it was removed later on.

I'm not familiar with futures' internals, but from a brief glance you could probably just add the check here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging a pull request may close this issue.

2 participants