Monitor.Enter vs Interlocked vs WaitHandle.WaitOne

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi to all.
What is difference between the methods found in the Monitor, Interlocked and
WaitHandle classes in terms of performance?
Is it true that Monitor.Wait uses the Interlocked class behind the scenes
(by using a spin-wait like mechanism)?
What does it mean that Interlocked doesn't switch to kernel mode and
WaitHandle does?
Do the Interlocked methods causes the calling thread to sleep until granted
exclusive access to the specified variables? (Does a context switch occur in
these methods?)
How do wait handles implemented anyway?
Thanks in advance.
 
Back
Top