我想知道在被丢弃的任务抛出的情况下会发生什么?
示例:SendMailAsync 抛出异常会发生什么情况?
我需要担心/处理它吗?(即安全问题、内存泄漏或其他问题......)
async SendMailAsync(){ ... long process that throws an exception...}
Method(){
//_ = is discard as opposed to await
_ = SendMailAsync();
}
Run Code Online (Sandbox Code Playgroud)