Skip to main content
Journey Uncommon Logo
JourneyUncommon
hardC#ThreadPool and work stealingSingle-choice MCQ

Consider this code. Assuming default ThreadPool settings on a machine with 4 logical cores and no prior pool growth, what is the dominant cause of the long total runtime?

for (int i = 0; i < 100; i++) Task.Run(() => Thread.Sleep(1000)); // caller then waits for all 100 to finish