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

static mpsc should be able to hand out senders after splitting #69

Open
hawkw opened this issue Aug 25, 2022 · 0 comments
Open

static mpsc should be able to hand out senders after splitting #69

hawkw opened this issue Aug 25, 2022 · 0 comments
Labels
enhancement New feature or request

Comments

@hawkw
Copy link
Owner

hawkw commented Aug 25, 2022

it would be nice to have a

pub fn sender(&'static self) -> Option<StaticSender<T, R>>

on the StaticChannel types. The split method can only be called once because it creates the receiver, and this is a single-receiver channel, but the channel type should be able to create multiple senders, rather than just returning a StaticSender that can be Cloned.

the method would need to return an Option (or Result?) though, because it shouldn't be able to make a new sender once the channel has closed (if either the rx was dropped or all the txs have been dropped).

@hawkw hawkw added the enhancement New feature or request label Aug 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant