Akka.Streams: Have SelectAsyncUnordered use local async function instead of ContinueWith#7531
Merged
Aaronontheweb merged 3 commits intoMar 18, 2025
Merged
Conversation
…ntinueWith` Replicates some of the behaviors and fixes we made to `SelectAsync` in akkadotnet#7521
Member
Author
|
More than likely I am going to need to update some unit tests |
Aaronontheweb
commented
Mar 18, 2025
Aaronontheweb
left a comment
Member
Author
There was a problem hiding this comment.
Detailed my changes
| TryPull(_stage.In); | ||
| return; | ||
|
|
||
| async Task RunTask(Task<TOut> tt) |
Member
Author
There was a problem hiding this comment.
Use an async local function with an await on the end-user Task<TOut> instead of using ContinueWith - this will result in better error handling and fewer weird task context issues.
Replicates the same work we did on #7521
| var sub = await c.ExpectSubscriptionAsync(); | ||
| sub.Request(10); | ||
| c.ExpectError().Message.Should().Be("err2"); | ||
| (await c.ExpectErrorAsync()).Message.Should().Be("err2"); |
Member
Author
There was a problem hiding this comment.
We no longer get AggregateExceptions here unless the test completes immediately, in which case we might have to harden this in the future.
| var sub = await c.ExpectSubscriptionAsync(); | ||
| sub.Request(10); | ||
| c.ExpectError().InnerException.Message.Should().Be("err1"); | ||
| (await c.ExpectErrorAsync()).Message.Should().Be("err1"); |
Member
Author
There was a problem hiding this comment.
We no longer get AggregateExceptions here unless the test completes immediately, in which case we might have to harden this in the future.
This was referenced Mar 21, 2025
This was referenced Sep 4, 2025
This was referenced Oct 7, 2025
This was referenced Oct 7, 2025
This was referenced Nov 6, 2025
This was referenced Feb 20, 2026
This file contains hidden or 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
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.
Changes
Replicates some of the behaviors and fixes we made to
SelectAsyncin #7521Checklist
For significant changes, please ensure that the following have been completed (delete if not relevant):
SelectAsync#7521