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 replacement for std::sync::Arc that uses portable-atomic::AtomicUsize #37

Closed
notgull opened this issue Sep 11, 2022 · 1 comment · Fixed by #41
Closed

Add a replacement for std::sync::Arc that uses portable-atomic::AtomicUsize #37

notgull opened this issue Sep 11, 2022 · 1 comment · Fixed by #41
Labels
C-enhancement Category: A new feature or an improvement for an existing one

Comments

@notgull
Copy link
Contributor

notgull commented Sep 11, 2022

There should be an alloc feature that provides a replacement for Arc that uses portable_atomic::AtomicUsize instead of the standard library version. This would allow users of portable_atomic to use Arc on targets where atomics are not supported but allocation is.

However, this may be better suited for an alternate crate instead of this crate. I can implement either if desired.

@taiki-e
Copy link
Owner

taiki-e commented Sep 12, 2022

Sounds good.
I was thinking it would be nice to have a crate (something like portable-atomic-util or portable-atomic-extra) to put in utilities like #8 that are more difficult to decide about API than existing APIs, but putting Arc in it seems like a good idea.

@taiki-e taiki-e added the C-enhancement Category: A new feature or an improvement for an existing one label Sep 12, 2022
bors bot added a commit that referenced this issue Sep 12, 2022
38: Add empty portable-atomic-util crate r=taiki-e a=taiki-e

This adds an empty crate named `portable-atomic-util`.

For now, I'm considering putting the features proposed in #1 (#8) and #37 into this crate, but they may be merged into the main `portable-atomic` crate in the future.


Co-authored-by: Taiki Endo <[email protected]>
@bors bors bot closed this as completed in 3d4a5e2 Sep 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-enhancement Category: A new feature or an improvement for an existing one
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants