Why Async Method always blocking thread?

后端 未结 4 1452
星月不相逢
星月不相逢 2021-01-29 02:38

I have a method async like this:

public static async Task SendMailAsync(){
...something
}

This method is very long time to return r

4条回答
  •  面向向阳花
    2021-01-29 03:14

    if you await a OtherMethod1() they will wait till the Method is finished, then he will execute OtherMethod2(). But if u dont await it could be that Method1 is not finished and Method2 will start. This depends on what is inside in Method1 and 2.

提交回复
热议问题