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

Add Stream::timeout #340

yoshuawuyts opened this issue Oct 15, 2019 · 0 comments · Fixed by #348


Copy link

@yoshuawuyts yoshuawuyts commented Oct 15, 2019

Similar to the future::timeout free function we should add a Stream::timeout method. This method should be marked as "unstable".


// This example will never actually time out, but you get the idea.
let s = stream::repeat(1u8).take(100);
let s = s.timeout(Duration::from_secs(1));
while let Some(_) = {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
1 participant
You can’t perform that action at this time.