According to MSDN, Monitor.Wait()
:
Releases the lock on an object and blocks the current thread until it reacquires the lock.
You use Enter
/ Exit
to acquire exclusive access to a lock.
You use Wait
/ Pulse
to allow co-operative notification: I want to wait for something to occur, so I enter the lock and call Wait
; the notifying code will enter the lock and call Pulse
.
The two schemes are related, but they're not trying to accomplish the same thing.
Consider how you'd implement a producer/consumer queue where the consumer can say "Wake me up when you've got an item for me to consume" without something like this.