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

Implement FusedStream for a few types #2048

Closed
wants to merge 3 commits into from

Conversation

udoprog
Copy link
Contributor

@udoprog udoprog commented Jan 4, 2020

This change implements futures_core::FusedStream for tokio::sync::mpsc::Receiver to make it more convenient to use with futures::select!.

I also noticed that the FusedStream impl for tokio::time::Interval was removed in #1774, I wouldn't mind resurrecting it since I would make use of it quite heavily.

@udoprog udoprog force-pushed the receiver-fused-stream branch from 6d58acb to 0570bac Compare January 5, 2020 17:54
@udoprog udoprog changed the title Implement FusedStream for mpsc::Receiver Implement FusedStream for a few types Jan 5, 2020
@udoprog
Copy link
Contributor Author

udoprog commented Jan 5, 2020

Added an implementation for time::Interval as well.

@carllerche
Copy link
Member

Thanks for the work. With #2152, the strategy will be to not implement FusedFuture / FusedStream.

@carllerche carllerche closed this Jan 22, 2020
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