Monitor.Wait vs Thread.Sleep

  • Thread starter Thread starter DT
  • Start date Start date
D

DT

Hi All,

I understand the Thread.Sleep method is a very effcient wait state.
Can the same be said for the Monitor.Wait method?

Many Thanks

DT
 
They're used for two different things. In Win32 most blocking waits are
efficient as long as you're letting the OS do the waiting, and the .NET
wrappers are no exception.
 
Thanks for the reply Klaus, I know they're different, I'm using the
Monitor.Wait method to wait for a period of time or when I want to signal
it. I just wanted to know there was any problems in doing this.

thanks
 
Back
Top