-
Notifications
You must be signed in to change notification settings - Fork 17
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
Support cancellation of streams created with StreamFrom in .NET client #32
Comments
Hi @Shmew. Would you accept a PR that addresses this? I guess the biggest concern would be that it's a breaking change as the function signature for "stream from" would need to change. |
Hi @kentcb, Yeah I'd accept a PR for this. I think it can be made non-breaking as it could be an optional parameter. |
Just looking at this now and realized I conflated two separate cancellation problems:
I'll create a separate issue for point 2 because I believe they're independently addressable. |
Actually, the second issue is more subtle. There is a CT buried away in |
Is your feature request related to a problem?
IHubConnection<...>
has aStreamFrom
that accepts aCancellationToken
and forwards onto the SignalR hub'sStreamAsync
method, butHubConnection<...>.StreamFrom
does not likewise accept aCancellationToken
. This means clients cannot cancel streams.Describe the solution you'd like
Cancellation should be exposed to clients, allowing them to proactively cancel a stream.
Describe alternatives you've considered
I've hacked this into my own copy of the code to prove it would work how I'd expect (how a raw SignalR stream works, basically). It required changes to both client and server.
The text was updated successfully, but these errors were encountered: