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

amalthea: use crossbeam channels instead of std channels #173

Closed
kevinushey opened this issue Feb 15, 2023 · 1 comment · Fixed by #176
Closed

amalthea: use crossbeam channels instead of std channels #173

kevinushey opened this issue Feb 15, 2023 · 1 comment · Fixed by #176
Milestone

Comments

@kevinushey
Copy link
Contributor

Rust's std channels have a very annoying property: the Receivers they produce are not Sync. This often implies that if you want to use a Rust std::channel within async code, you need to Arc<Mutex<>> it, even if it's not really shared across different components.

crossbeam's channels do not suffer from this limitation, and are generally regarded as better than the std equivalents. Given that Rust has even decided to import crossbeam-channel to be used instead, I think that's a strong sign that we can use them as well:

rust-lang/rust#93563

I would propose we switch from std channels to crossbeam channels and avoid using the std equivalents.

@kevinushey
Copy link
Contributor Author

@petetronic petetronic added this to the Private Alpha milestone Aug 26, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 3, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants