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

Easy way to turn a Receiver<_> into a Subscription? #1171

Closed
cbeust opened this issue Dec 26, 2021 · 2 comments
Closed

Easy way to turn a Receiver<_> into a Subscription? #1171

cbeust opened this issue Dec 26, 2021 · 2 comments

Comments

@cbeust
Copy link

cbeust commented Dec 26, 2021

I set up a pair of tx and rx:

        let (tx, rx) = mpsc::channel::<CpuMessage>();

The transmitter emits a bunch of messages and I was wondering if there is an easy way to turn the receiver (std::sync::mpsc::Receiver) into a Subscription so I can easily hook it up into my iced application.

@13r0ck
Copy link
Contributor

13r0ck commented Dec 27, 2021

I think #1172 has morphed into a dupe of this. As that one has responses, would you mind closing this one please?

@cbeust
Copy link
Author

cbeust commented Dec 27, 2021

Dupe of #1172, closing.

@cbeust cbeust closed this as completed Dec 27, 2021
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

No branches or pull requests

2 participants