Thread.sleep vs Monitor.Wait vs RegisteredWaitHandle?

Posted by Royi Namir on Stack Overflow See other posts from Stack Overflow or by Royi Namir
Published on 2012-07-08T08:31:30Z Indexed on 2012/07/08 9:15 UTC
Read the original article Hit count: 277

Filed under:
|
|
|
|

(the following items has different goals , but im interesting knowing how they "PAUSEd")

questions

Thread.sleep - Does it impact performance on a system ?does it tie up a thread with its wait ?

what about Monitor.Wait ? what is the difference in the way they "wait"? do they tie up a thread with their wait ?

what aboutRegisteredWaitHandle ? This method accepts a delegate that is executed when a wait handle is signaled. While it’s waiting, it doesn’t tie up a thread.

so some thread are paused and can be woken by a delegate , while others just wait ? spin ?

can someone please make things clearer ?

edit

http://www.albahari.com/threading/part2.aspx

enter image description here

© Stack Overflow or respective owner

Related posts about c#

Related posts about .NET