-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
[ManagedHandler] Improve cancellation support when sending/receiving data #23138
Comments
@stephentoub Before submitting any fix, I wanted to witness the error, so uncommented the associated test Still, I am not able to reproduce the issue by giving command Am I missing something? Appreciate your inputs. |
@WinCPP, the test is marked |
Hi @stephentoub , I think I have some solution. The method I am not sure if Also should I raise a PR for whatever code changes I have done...? Appreciate your inputs even if I am seeing the above mentioned issues? |
That would seem to be due to your changes then. It's currently passing on .NET Core. |
Sure, but I'm not sure how you'll be successful at this presently, given that the underlying sockets don't yet have actual support for cancellation enabled. What is the solution you're attempting? |
Hi @stephentoub, The solution that I am attempting is based on one of the ways that you mentioned in the opening comment for this issue, quoted below,
I came across this blog of yours on which the solution is based. I understand that it may not be clean solution but it kind of adheres to one of the suggested solutions (for now until sockets get support for cancellation)... I am fine tuning the code and also checking why |
Hi @stephentoub I could make some progress on this. As for the hang in |
Support CancellationToken for ManagedHandler
Support CancellationToken for ManagedHandler
Hi @stephentoub thanks for the inputs in this comment. I will try working on it for dotnet/corefx#24430 and then make use of it here... |
@stephentoub per our email discussion, sounds like you have a solution for this... |
We can do something similar to what WinCPP was working on. I'm working through some of the more intricate details. It's far from ideal, but I think it'll be shippable. |
The ManagedHandler_CancellationTest tests are disabled because sockets don't support canceling individual operations. We might be able to address this once https://github.com/dotnet/corefx/issues/22608 is implemented and the associated cancellation support is enabled. We could also employ a variety of workarounds, including ending the whole request on cancellation by disposing of the connection, wrapping the operations in ones that can be canceled even though the underlying operation may continue running, etc.
The text was updated successfully, but these errors were encountered: