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

Use flume instead of crossbeam-channel #9

Merged
merged 2 commits into from
Jan 19, 2022

Conversation

lu-zero
Copy link
Contributor

@lu-zero lu-zero commented Jan 18, 2022

Makes even easier to use the library from an async context.

@lu-zero lu-zero force-pushed the flume branch 2 times, most recently from f22bb4a to 58363f9 Compare January 18, 2022 14:59
Copy link
Owner

@keepsimple1 keepsimple1 left a comment

Choose a reason for hiding this comment

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

Thanks for the PR, this looks awesome! Some of the API return types would become flume::Receiver but the change will be worth it. I only have a couple of minor comments inline.

(A related thought is that, we don't have tests or example to cover the async use case yet. That's okay for us now because otherwise we will have to drag in dev-dependencies for async runtime, making this crate much larger. The overhead feels too big for a relatively small benefit.)

@@ -18,7 +18,7 @@ jobs:
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: 1.46.0
toolchain: 1.49.0
Copy link
Owner

Choose a reason for hiding this comment

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

I guess flume requires 1.49 and up? If so, could you please also update the version number in README.md ?

Cargo.toml Outdated
log = "0.4.14" # logging
nix = "0.23.0" # socket APIs

[dependencies.flume]
Copy link
Owner

Choose a reason for hiding this comment

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

Just to have a consistent style, could you please define this in the [dependencies] section above?

Makes even easier to use the library from an async context.
Bump the MSRV 1.49.0 since a flume dependency relies on a
dependency that uses `hint::spin_loop`.
This way it is not needed to know which is the channel implementation.
@keepsimple1 keepsimple1 merged commit 1e5d47d into keepsimple1:main Jan 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants