# Sample: the cost of blocking a thread

Queues 1000 concurrent operations that each wait 50 ms, once by blocking a thread pool thread and once by
awaiting. Both print the elapsed time and how many threads the thread pool ended up with.

    cd ThreadPoolStarvation
    dotnet run -c Release

The blocking version needs one thread per concurrent operation. The thread pool does not create them all at
once: past its minimum it adds threads slowly, so the batch takes far longer than the 50 ms each operation
actually waits. The async version needs no thread at all while waiting, so the whole batch takes about 50 ms.
