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

Add ToTask overloads with IScheduler #1107

Merged
merged 3 commits into from
Dec 5, 2019

Conversation

akarnokd
Copy link
Collaborator

@akarnokd akarnokd commented Dec 5, 2019

This PR adds IScheduler overloads to the ToTask operator so that when the source terminates, the resumption is moved to the specified scheduler and performed there.

This helps avoiding the case when the result of ToTask is awaited without capturing the current context or awaited in a way that blocks the resumption thread and thus the post-resumption actions inside ToTask can't run (i.e., disposing the upstream).

Resolves #838

@danielcweber danielcweber merged commit 7d680cb into dotnet:master Dec 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ToTask doesn't unsubscribe properly
2 participants