-
Notifications
You must be signed in to change notification settings - Fork 4
Join stream #3
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
Join stream #3
Conversation
dcd9cce
to
25f9b0e
Compare
Does this need to be a macro? It seems that the most common use-case is joining two streams, and |
@matklad oh yeah, it doesn't need to be a macro for sure. I figured it'd be slightly more symmetrical with the other join macros: async_std::future::join;
async_std::future::select;
async_std::future::try_join;
async_std::future::try_select;
async_std::stream::join; I agree we may want to consider adding a Perhaps a question then becomes: what about |
5a98112
to
4387dde
Compare
4387dde
to
0798d2a
Compare
Ah, I see! (note: the following is not an argument for a particular position, just musings aloud). It seems like |
Signed-off-by: Yoshua Wuyts <[email protected]>
Signed-off-by: Yoshua Wuyts <[email protected]>
Signed-off-by: Yoshua Wuyts <[email protected]>
Signed-off-by: Yoshua Wuyts <[email protected]>
@matklad These are all great points! Actually I've considered the name But I still think You make a good point though about this not having to be a macro in the same way that the futures variants have tho. I guess I'm still in favor of what I'm proposing here, but it's not really a strong opinion -- more of an intuitive preference that I'm curious how people will like it. |
Some other terminology observations:
|
I've written about naming in here. Might be useful: I think |
I've looked before, and can't find any reference to a
Ah yeah, that's a fair point too. Though there are a lot of references to
@vertexclique Could you say more about why you think this is the case? From my perspective this seems like one of core concurrency primitives for streams, which I think makes sense to at least trial as part of what we're covering. |
D'oh, I was looking at futures 0.1: https://docs.rs/futures/0.1.29/futures/stream/trait.Stream.html#method.merge |
I've been mulling this over for the past day, and still think |
Depends on #1 to land first. Adds a new
stream_join
macro that can join multiple streams into a single stream:Thanks!