Skip to content

add stream::FusedStream as "unstable" #326

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

Merged
merged 1 commit into from
Oct 14, 2019
Merged

add stream::FusedStream as "unstable" #326

merged 1 commit into from
Oct 14, 2019

Conversation

yoshuawuyts
Copy link
Contributor

@yoshuawuyts yoshuawuyts commented Oct 14, 2019

Implements Stream::FusedStream. This is a different API from futures-rs that instead is closer to std, and resembles the API futures-rs had prior to 0.3.0-alpha.10 (added in rust-lang/futures-rs#1259, October 2018).

Because we don't require select! {} for stream multiplexing in async-std, the is_terminated method doesn't really serve a purpose for us, and really only requires extra bookkeeping.

Because FusedStream is used for optimization purposes only, I think it's not a big deal to diverge from futures-rs on this account.

Thanks!

Signed-off-by: Yoshua Wuyts <yoshuawuyts@gmail.com>
@yoshuawuyts yoshuawuyts added the enhancement New feature or request label Oct 14, 2019
@yoshuawuyts yoshuawuyts merged commit 9b0e02d into master Oct 14, 2019
@yoshuawuyts yoshuawuyts deleted the fused-stream branch October 14, 2019 12:22
@yoshuawuyts
Copy link
Contributor Author

Ref #129

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

Successfully merging this pull request may close these issues.

1 participant