Advanced C#
Q68 / 100

What is the difference between Thread.Sleep and Task.Delay?

Correct! Well done.

Incorrect.

The correct answer is B) Thread.Sleep blocks the thread; Task.Delay is async and releases the thread during the wait

B

Correct Answer

Thread.Sleep blocks the thread; Task.Delay is async and releases the thread during the wait

Explanation

Thread.Sleep(1000) blocks the OS thread for 1 second. await Task.Delay(1000) suspends the async method, returning the thread to the pool during the wait.

Progress
68/100