how do set a timeout for a method

前端 未结 8 1344
情书的邮戳
情书的邮戳 2020-12-25 15:10

how do set a timeout for a busy method +C#.

8条回答
  •  难免孤独
    2020-12-25 15:57

    Methods don't have timeouts in C#, unless your in the debugger or the OS believes your app has 'hung'. Even then processing still continues and as long as you don't kill the application a response is returned and the app continues to work.

    Calls to databases can have timeouts.

提交回复
热议问题