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

Enable an option for portable-atomic #2670

Merged
merged 1 commit into from
Dec 7, 2022

Conversation

notgull
Copy link
Contributor

@notgull notgull commented Dec 4, 2022

This PR enables an option in futures-core that replaces the atomic usage in AtomicWaker with portable-atomic, and also exposes that flag in futures-util. This intends to make it so futures-core can be used on platforms without atomics, like AVR.

I look through futures-util and didn't see any other usage of atomics that wasn't also locked behind allocation, so I think this is the best I can do here.

@notgull notgull requested a review from taiki-e as a code owner December 4, 2022 22:29
@taiki-e
Copy link
Member

taiki-e commented Dec 4, 2022

Thanks!

I look through futures-util and didn't see any other usage of atomics that wasn't also locked behind allocation, so I think this is the best I can do here.

Ah, the alloc feature uses Arc in the public API, so even if taiki-e/portable-atomic#41 is released it will not be easy to support it. I have a few hacks ideas to support it, so I will try it after I merge this PR.

(CI failure is probably a problem addressed in rust-lang/miri#2713 I guess it will be fixed after the next Miri update)

@taiki-e taiki-e merged commit 2acba12 into rust-lang:master Dec 7, 2022
@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 Dec 7, 2022
@notgull notgull deleted the portable-atomic branch December 7, 2022 17:13
@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 Jan 30, 2023
taiki-e pushed a commit that referenced this pull request Jan 30, 2023
taiki-e pushed a commit that referenced this pull request Jan 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