Mutex, lock, Monitor

  • Thread starter Thread starter Ryan Liu
  • Start date Start date
R

Ryan Liu

Hi,

Cane someone compare Mutex, lock, Monitor, and when to use which one?

And the concept of waiting query, ready query, Pulse, PulseAll, can someone
explain a little bit?

Thanks a lot!
Ryan
 
Ryan Liu said:
Cane someone compare Mutex, lock, Monitor, and when to use which one?

lock is just syntactic sugar for Monitor, which should usually be the
first port of call. Mutex is useful when you need a way of
synchronizing across different processes.
And the concept of waiting query, ready query, Pulse, PulseAll, can someone
explain a little bit?

See http://www.pobox.com/~skeet/csharp/threads
- although that doesn't cover "waiting query" and "ready query".
 

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