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

Retain method for SelectAll streams #2753

Open
TylerBloom opened this issue Jun 12, 2023 · 2 comments
Open

Retain method for SelectAll streams #2753

TylerBloom opened this issue Jun 12, 2023 · 2 comments
Labels
A-stream Area: futures::stream C-feature-request S-needs-implementation Status: Implementation work is needed.

Comments

@TylerBloom
Copy link

Currently, there is no ergonomic way to manage the internal streams in a SelectAll. In particular, there is no way to remove streams with a significant workaround. It would be nice to have a method such as retain that could be used to remove streams that are owned by the SelectAll. This would be particularly helpful for long-running SelectAll streams whose constituent streams live for much less time.

@taiki-e taiki-e added C-feature-request A-stream Area: futures::stream labels Jun 12, 2023
@taiki-e
Copy link
Member

taiki-e commented Jun 12, 2023

At first glance, this seems reasonable to me.

@taiki-e taiki-e added the S-needs-implementation Status: Implementation work is needed. label Jul 20, 2023
@TylerBloom
Copy link
Author

I was recently revisiting this idea. While the retain method that I proposed could (and maybe should) be implemented, a better solution to the problem that I described is a SelectAll for FusedStreams. This would function similarly to the SelectAll futures in that a stream is dropped as soon as it knows that it is finished.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-stream Area: futures::stream C-feature-request S-needs-implementation Status: Implementation work is needed.
Projects
None yet
Development

No branches or pull requests

2 participants