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

RFC: Add portability risk for atomics #2269

Merged
merged 2 commits into from
Jun 11, 2021
Merged

RFC: Add portability risk for atomics #2269

merged 2 commits into from
Jun 11, 2021

Conversation

teor2345
Copy link
Contributor

@teor2345 teor2345 commented Jun 9, 2021

Motivation

Atomics also carry a portability risk.

We've collected a few potential issues with atomics, including correctness, maintainability, testing, and portability. So let's just avoid them going forward.

Specifications

API documentation:
https://doc.rust-lang.org/std/sync/atomic/#portability

Designs

Updates the atomics section from the "async Rust in Zebra" RFC:
https://github.com/ZcashFoundation/zebra/edit/main/book/src/dev/rfcs/0011-async-rust-in-zebra.md#using-atomics

Solution

  • add portability risks
  • rewrite atomics section to just recommend channels

Review

@jvff and @oxarbitrage will probably want to check this one.

It's a low-priority documentation update.

Reviewer Checklist

  • RFC summarises API documentation accurately

Follow Up Work

Replace atomics with channels #2268

@teor2345 teor2345 added A-docs Area: Documentation C-enhancement Category: This is an improvement P-Low labels Jun 9, 2021
@teor2345 teor2345 requested review from jvff and oxarbitrage June 9, 2021 22:58
@teor2345 teor2345 self-assigned this Jun 9, 2021
oxarbitrage
oxarbitrage previously approved these changes Jun 10, 2021
Copy link
Contributor

@oxarbitrage oxarbitrage left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK.

@teor2345 teor2345 merged commit 71c10af into main Jun 11, 2021
@teor2345 teor2345 deleted the rfc-replacing-atomics branch June 11, 2021 02:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-docs Area: Documentation C-enhancement Category: This is an improvement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants