This is my issue. I have an API where i make calls to get data from. Something like this:
"res = client.GetResult(sessionID, out ResultObject, out Err);"
where "GetResult" would be the method where the call is made passing SessionId as a parameter and (Out ResultObject ) and (Out Err) are the two obj that the API will return. Normally this request takes less than a second but issue comes when that request gets stuck and takes over 10 seconds to return the value, since the call is not an an asynchronous call the code gets stuck there until finally gets a response which always get.
I need to implement something that if the request is taking +2 seconds then try again. I'm not able to come up with a solution where i can specify this condition before starting the call.
Please notice that the result are being returned by "Out"
this is for C# - MVC4
Ideas will be highly appreciated
Allan.