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

util: Add task::Wake #145

Merged
merged 1 commit into from
Dec 28, 2023
Merged

util: Add task::Wake #145

merged 1 commit into from
Dec 28, 2023

Conversation

taiki-e
Copy link
Owner

@taiki-e taiki-e commented Dec 28, 2023

This is an equivalent to std::task::Wake, but using portable_atomic_util::Arc as a reference-counted pointer.

Note: Unlike std::task::Wake, all methods take this: instead of self:. This is because using portable_atomic_util::Arc as a receiver requires the unstable arbitrary_self_types feature.

This should allow crates like waker-fn to support targets without atomics.
FYI @notgull

@taiki-e taiki-e added the A-portable-atomic-util Area: related to portable-atomic-util crate label Dec 28, 2023
@taiki-e taiki-e merged commit edb636b into main Dec 28, 2023
@taiki-e taiki-e deleted the wake branch December 28, 2023 17:35
@taiki-e
Copy link
Owner Author

taiki-e commented May 7, 2024

Published in portable-atomic-util 0.2.0.

notgull pushed a commit to smol-rs/waker-fn that referenced this pull request May 9, 2024
portable-atomic-util now provides `std::task::Wake` equivalent: taiki-e/portable-atomic#145
This allows crates like waker-fn to support targets without atomics.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-portable-atomic-util Area: related to portable-atomic-util crate
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants