-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
ThreadPool hang #2083
Comments
This seems like a classic case of artificial bounds on thread pool max thread size ends up causing a deadlock of some sort due to async keyword usage and the synchronous methods not actually being synchronous internally (somehow).. i.e. something like this might be happening:
This is a basic async or distributed processing system issue that can occur when the interfaces to constrained systems don't have built-in support for providing back pressure to the callers. (which isn't easy to do or easy to use once accomplished) This also might be exacerbated by #2160, but I'm not sure there's necessarily a lot the RestSharp developers should do in this area above and beyond #2160. |
We've just noticed the same issue on .NET 4.8 with synchronous calls.
The thread just hangs and keeps chewing memory until it causes the instance to crash. We have replaced it with the
and it works fine. Not sure what's the difference internally but might worth to remove synchronous method specific overloads (if finding out the issue proves too complicated). I suppose it has something to do with the thread synchronisation and would be great if we can use the async calls but this is a legacy app and refactoring is just not worth it. |
Describe the bug
I use request url in ThreadPool, min Threads set to 2,Max Threads set to 10,when i run my code ,
after ExecuteGet i got hang,nothing response happen
RestSharp version 110.2.0, Net Framwork version:4.7.1
To Reproduce
here is my code
Stack trace
Copy the full stack trace here if you get an exception.
Desktop (please complete the following information):
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: