Joe Duffy's book Concurrent Programming provides all of the details you need. But to summarize:
Thread.Sleep
behaves similar to the Win API function SleepEx.
- A duration parameter = 0 will cause the current thread to yield to another with equal or higher priority.
- A duration parameter > 0 will cause a context switch and the current thread will remain in a Waiting state for until the specified amount of time has elapsed (approximately).
- The thread will remain in an alertable state which means it is allowed to process APC methods via QueueUserAPC and will respond to
Thread.Interrupt
calls.
I recommend poking through the SSCLI code for a more complete understanding of how it is implemented.
Regarding your question about not being able to reuse the thread for other work...I am a bit confused. Thread.Sleep
is a voluntary suspension so you (the programmer) told the thread not to do any more work. And like I mentioned above the thread is said to be alertable so you could actually interrupt it or even force it to do work via APC methods.
Refer to this question for more information about getting .NET threads to run APCs while Thread.Sleep
is still pending.