-
Notifications
You must be signed in to change notification settings - Fork 215
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
make crossbeam-channels optional #425
Conversation
I'll leave an updated documentation to #395 |
74c6903
to
fcd5643
Compare
fcd5643
to
335e27b
Compare
One downside of this approach is that users will have to use notify = { version = "5", default-features = false, feature=["macos_kqueue"] } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like a good approach!
One downside of this approach is that users will have to use
notify = { version = "5", default-features = false, feature=["macos_kqueue"] }
I think it's acceptable as only those who want to disable it have to touch the file, that is existing users that don't have the crossbeam issue don't have to tweak their Cargo.toml.
I wonder whether it would be worth switching wholesale to something like https://docs.rs/flume/latest/flume/ ? I believe it has very similar performance to crossbeam_channel. It might cause the same problem of course. |
Unbounded MPSC seems to be the only case crossbeam-channel doesn't win over flume according to their benchmarks. Replacing our mpsc stuff with spsc would probably make more sense. As far as I know parts of crossbeam are considered for moving into std, which would give it more credibility.
|
If flume does prevent tokio errors, I'd be willing to accept a PR. For now my main concern is resolving the tokio scheduler issues. This PR makes it very easy to switch it out, so if any one wants to test this, feel free. As far as I know, you can't instantly trigger this scheduler hang, so testing help is welcome for this. Edit: Just to clairfy: Flume looks good (I've never heard of it previously), but for now I'd prefer to finish #249 once and for all. Then we can still introduce flume later on. Crossbeam seems also stuck in 0.5 limbo, but at least is has a very big userbase, so I don't fear breaking much leaving it in. |
Allows disabling crossbeam-channel by disabling default features.
This fixes #380