[SignalR] Possibility to cancel long running hub method from client
See original GitHub issueI´m not quit sure if this post is more of a question or a feature request.
I noticed that the InvokeAsync<TResult>(HubConnection, String, CancellationToken) method accepts a CancellationToken. As far as I understood this token only cancels the invocation (and waiting for a result, …) on the client, while on the server side the method proceeds.
Is this correct?
If so wouldn´t it be a nice feature to allow such a cancellation? I saw that Google offers this possibility in their gRPC framework aswell:
Cancelling RPCs Either the client or the server can cancel an RPC at any time. A cancellation terminates the RPC immediately so that no further work is done. It is not an “undo”: changes made before the cancellation will not be rolled back.
When my understanding is wrong please provide me an example on how to do a cancellation of long running hub methods from the client.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:10
- Comments:25 (10 by maintainers)
Top Related StackOverflow Question
Hi, we need this functionality too. We have been waiting for this feature several months and one of our motivations for upgrading to .NET5 was this feature which was presented in .NET5 backlog. Now I see, it is not implemented yet 😕 Is there any ETA for this one? Thank you.
Today we only support cancellation for streams but there’s nothing wrong with supporting this for other invocations.