Перейти к основному содержанию
Zoro
Вопросы
Таймер
Резервное копирование
Главная
/
🅰️ C#
/
Вопросы 165
C#:
What is the difference between Task.Delay and Thread.Sleep?
🎯
Режим фокуса
165
🅰️
C#
🌱 junior
Снять отметку
What is the difference between Task.Delay and Thread.Sleep?
Task.Delay
— non-blocking.
Thread.Sleep
— blocking.
csharp
Копировать
1
await Task.Delay(1000);
2
Thread.Sleep(1000);
Task.Delay
— async.
Thread.Sleep
— sync.
Больше вопросов по C#
What is C# and what is it used for?
What is the .NET ecosystem?
What is the difference between .NET Framework, .NET Core, and .NET 5+?
What is CLR (Common Language Runtime)?
What is the difference between value types and reference types in C#?
What is the difference between Task.Run and Task.Factory.StartNew?
What is the difference between Task.Result and await?
Назад к категории C#