How to abort a long running method?

后端 未结 5 1356
攒了一身酷
攒了一身酷 2021-01-23 01:23

I have a long running method and I want to add timeout into it. Is it feasible to do that? Something like:

AbortWaitSeconds(20)
{
    this.LongRunningMethod();
}         


        
5条回答
提交回复
热议问题