It’s dangerous using Wait on a Task and the async keyword together. With applications using the synchronization context(同步上下文), this can easily result in a deadlock.
In the method OnStartDeadlock, the local function DelayAsync is invoked. DelayAsync waits on the completion of Task
C# async await 死锁的一个情况
最新推荐文章于 2024-04-11 12:33:19 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)