How to do retry to a 3rd party API which can't return value and stalled (hang)?


i've 3rd party dll/api, int foo(), don't have source code.

i rely on foo() return code prior next action.

recently, found api not return caller stalled (hang).

is there way can put timeout around api can retry call?

e.g. after 10 sec, api still not return me value, call api again retry avoid hang issue.

sample code , pointers appreicated.

thanks.

i found begininvoke() , endinvoke() can issue. thanks.



Visual Studio Languages  ,  .NET Framework  >  Visual C#



Comments

Popular posts from this blog

Azure DocumentDB Owner resource does not exist

RFC_ERROR_SYSTEM_FAILURE with SAP ECC 6 Unicode

C# System.Data.Common DbCommand and getting Datasets from Oracle