You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
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:
The file you're reading in to create messages might have, say, 100 lines.
The for loop to queue all of the work items to the thread pool might queue all 100 lines before GetMsg has a chance to invoke RestSharp
When RestSharp transitions to async keyword-related code (or invokes code that does so for it), the invoked code wants to queue additional work items to the thread pool, but due to the thread pool maximum thread count size constraint, you supplied, these work items are stuck in the thread pool queue and don't get any execution time.
This causes the thread pool threads all to get blocked, with some call stack waiting on some other thread pool item that will not ever execute because it's stuck in the thread pool work list and is further back in the queue.
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.
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: