I was testing some async code today and I have something that I don't fully understand.
What you are seeing in this photo is the Main thread being released after the DoWorkAsync method. Then the Thread pool assigns us the thread with ID 4 to do some work. In this case, it just Delays. My question is when we are finished with the method that was performed by worker 4 and go back to the main which asynchronously waited why isn't the main thread finishing the work? What does actually happen with this main thread while it was free? Can the thread pool take it in the pool or does it stay somewhere else?