forked from rust-lang/futures-rs
-
Notifications
You must be signed in to change notification settings - Fork 0
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
Early exit stream selection #1
Closed
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
f9ce1e3
to
7bbe063
Compare
dc0ec68
to
9ef954f
Compare
The v2 implementation uses Node 12, which is end-of-life on April 30, 2022. See https://nodejs.org/en/about/releases/. Update to v3, which is based on Node 16 whose support lasts until April 30, 2024.
33c15bb
to
3c27fd3
Compare
3c27fd3
to
7aefa94
Compare
LocalPool::try_run_one and run_until_stalled now correctly re-try when a future "yields" by calling wake and returning Pending.
``` error: unresolved link to `select` --> futures-util/src/future/try_future/mod.rs:272:17 | 272 | /// using [`select!`] or [`join!`]. | ^^^^^^^ no item named `select` in scope | = note: `-D rustdoc::broken-intra-doc-links` implied by `-D warnings` = note: `macro_rules` named `select` exists in this crate, but it is not in scope at this link's location error: unresolved link to `join` --> futures-util/src/future/try_future/mod.rs:272:32 | 272 | /// using [`select!`] or [`join!`]. | ^^^^^ no item named `join` in scope | = note: `macro_rules` named `join` exists in this crate, but it is not in scope at this link's location error: unresolved link to `select` --> futures-util/src/future/try_future/mod.rs:320:27 | 320 | /// type when using [`select!`] or [`join!`]. | ^^^^^^^ no item named `select` in scope | = note: `macro_rules` named `select` exists in this crate, but it is not in scope at this link's location error: unresolved link to `join` --> futures-util/src/future/try_future/mod.rs:320:42 | 320 | /// type when using [`select!`] or [`join!`]. | ^^^^^ no item named `join` in scope | = note: `macro_rules` named `join` exists in this crate, but it is not in scope at this link's location error: unresolved link to `select` --> futures-util/src/stream/stream/mod.rs:1802:15 | 1802 | /// the [`select!`] macro. | ^^^^^^^ no item named `select` in scope | = note: `macro_rules` named `select` exists in this crate, but it is not in scope at this link's location ```
Although a relatively small change, it makes the code a little bit more readable than the originally nested `match` expressions.
SeeKRelative -> SeekRelative
Fixes a minor typo by changing "a tasks" to "a task" in the documentation comment for enter. Signed-off-by: hasheddan <georgedanielmangum@gmail.com>
9a34f07
to
daeeec9
Compare
`select_early_exit` creates a stream that produces elements while either stream contains elements, and terminates when either stream runs out of elements.
daeeec9
to
b593044
Compare
b593044
to
8aefbed
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This builds on rust-lang#2583
I'll upstream this PR if/when that is merged.