Switch from crossbeam-channel to std::sync::mpsc::channel.#1924
Merged
Conversation
3a00841 to
41a9f19
Compare
The code is identical except that rust-lang/rust#107466 is fixed in std but not in crossbeam-channel. I originally reworked this because the bug in 80ff3ff made me desparate to suspect something is wrong with the channel. While it didn't turn out to be an issue with the channels I still think it's good to depend on std code instead of a library. Signed-off-by: Gerd Zellweger <mail@gerdzellweger.com>
Signed-off-by: Gerd Zellweger <mail@gerdzellweger.com>
blp
approved these changes
Jun 23, 2024
blp
left a comment
Member
There was a problem hiding this comment.
Maybe crossbeam is faster but I doubt it has any impact on this use case.
Contributor
|
I didn't realize they switched std to use the crossbeam channel. Do they use the crossbeam mutex as well in std or is it still a different impl? |
Member
Oh gosh, you say they're identical except for a bug fix. I need to read better. |
Contributor
Author
Not sure, but they switched to use futex at some point |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The channel code in std is identical to crossbeam (taken from on crossbeam-channel) except that rust-lang/rust#107466 is fixed in std but not in crossbeam-channel.
I originally reworked this because the bug in 80ff3ff made me desperate to suspect something is wrong with the channel. While it didn't turn out to be an issue with the channels it's easier to depend on std code instead of a library.
Is this a user-visible change (yes/no): ___