C# Threading: What's the difference between Block and WaitSleepJoin?
This is in reference to a thread's state.
Is there a difference be开发者_Python百科tween a thread being Blocked and a thread being in a WaitSleepJoin state, or are they one in the same?
Thanks
The ThreadState
enumeration (System.Threading
) doesn't have a Blocked
state.
From MSDN:
WaitSleepJoin
- The thread is blocked. This could be the result of calling Thread.Sleep or Thread.Join, of requesting a lock — for example, by calling Monitor.Enter or Monitor.Wait — or of waiting on a thread synchronization object such as ManualResetEvent.
The System.Diagnostics.ThreadState
enumeration doesn't have a Blocked
or a WaitSleepJoin
member.
精彩评论