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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top