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

Cancel in-flight TaskCompletionSources in ToAsyncEnumerable(Observable). #1158

Merged
merged 1 commit into from
Mar 24, 2020
Merged

Cancel in-flight TaskCompletionSources in ToAsyncEnumerable(Observable). #1158

merged 1 commit into from
Mar 24, 2020

Conversation

danielcweber
Copy link
Collaborator

@danielcweber danielcweber commented Mar 24, 2020

Fixes #1157.

@akarnokd Not sure whether my proposed solution isn't already overkill. You are more experienced with lock free code.

I think it is safe to cancel a MoveNextAsync in-flight because it cancels the wait for an upstream notification. There is no work that in reality cannot be cancelled and would still go on.

@danielcweber danielcweber requested a review from akarnokd March 24, 2020 15:50
@danielcweber danielcweber merged commit 103c60e into dotnet:master Mar 24, 2020
@danielcweber danielcweber deleted the Fix1157 branch March 24, 2020 17:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cancelling IAsyncEnumerable from ToAsyncEnumerable(IObservable) does not raise TaskCancellationException
2 participants