Answers for "c# will thread.sleep put async functions to sleep?"

C#
4

c# async sleep

// Async
await Task.Delay(1000); //when you want a logical delay without blocking the current thread
// Not Async
Thread.Sleep(1000) //when you want to block the current thread.
Posted by: Guest on August-22-2020
4

c# thread sleep

Thread.Sleep(2000); //in ms
Posted by: Guest on June-05-2020

C# Answers by Framework

Browse Popular Code Answers by Language