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

Do you have plan to implement broadcast channel? #9

Open
cecton opened this issue Oct 17, 2022 · 3 comments
Open

Do you have plan to implement broadcast channel? #9

cecton opened this issue Oct 17, 2022 · 3 comments
Labels
discussion enhancement New feature or request

Comments

@cecton
Copy link

cecton commented Oct 17, 2022

Nice work!!

I think it would be nice to have a clear separation of the different kind of channels. I assume the one currently implemented is mpmc because both the sender and the receiver implements Clone. (Would there be a speed improvement to also implement mpsc?)

I would be really interested to see an implementation for a broadcast type of channel. You send the message once, the message needs to implement Clone, and all the receivers receive a copy of it. Like it is done by the crate async-broadcast.

@fereidani
Copy link
Owner

Thank you!
Yes, maybe for 0.2 and not as a default feature in my opinion currently I'm trying not to add any new features until our code is audited completely.
Kanal community can discuss implementation and requirements until then here.

@JakkuSakura
Copy link

Broadcast channel disallows some optimizations like in-stack-transfer, which is the shining point of this extremely fast crate. If so, why not just use an existing crate async-broadcast

@fereidani
Copy link
Owner

I think we can do the same optimization using the signal for broadcast too. but I'm unsure to add broadcast type to Kanal. in one hand I like Kanal to be complete and featureful but in case maintaining both normal and broadcast channels together proves to be counter-productive for us. I prefer to keep Kanal away from the broadcast channels.
We wait and see what happens after 0.1.0 release.

@fereidani fereidani added enhancement New feature or request discussion labels Nov 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants