C# Task.Delay() 和 Thread.Sleep() 区别 - zLulus/My_Note GitHub Wiki
摘抄自C# Task.Delay() 和 Thread.Sleep() 区别
Use Thread.Sleep when you want to block the current thread. 要阻止当前线程时,请使用Thread.Sleep
。
Use Task.Delay when you want a logical delay without blocking the current thread. 如果需要逻辑延迟而不阻塞当前线程,请使用Task.Delay
。