-
Notifications
You must be signed in to change notification settings - Fork 328
Open
Description
I am surprised to see
Thread.Sleep(Timeout.Infinite);
and not
async Task Main...
...
await Task.Delay(Timeout.Infinite);
My concern is that, Thread.Sleep
is a blocking operation. Won't it completely disable 1 thread from doing any work at all times? Won't Task.Delay
give the thread back to the scheduler instead so it could do whatever it has to, while it simply await and not blocks?
Please let me know if the example is simply outdated or if it is justified. Thanks!
Metadata
Metadata
Assignees
Labels
No labels