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

Add a zero-allocation way to get a Waker from an Unparker #17

Closed
notgull opened this issue Oct 6, 2023 · 0 comments · Fixed by #18
Closed

Add a zero-allocation way to get a Waker from an Unparker #17

notgull opened this issue Oct 6, 2023 · 0 comments · Fixed by #18
Labels
good first issue Good for newcomers

Comments

@notgull
Copy link
Member

notgull commented Oct 6, 2023

Unparker is an Arc<Inner>. If Inner implements std::task::Wake, that Arc<Inner> can be converted into a Waker without any additional allocations. This would be useful for the implementation of futures_lite::future::block_on, whose Waker implementation just calls Unparker::unpark.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Development

Successfully merging a pull request may close this issue.

1 participant