By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
457,889 Members | 1,259 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 457,889 IT Pros & Developers. It's quick & easy.

Events(WaitHandle) and Monitor

P: n/a
Tim
Are AutoReset Event/ManualReset Event and Monitor.Pulse used for the same
purpose?

Can they be used interchangeably?
Jan 3 '06 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Tim <Ti*@discussions.microsoft.com> wrote:
Are AutoReset Event/ManualReset Event and Monitor.Pulse used for the same
purpose?

Can they be used interchangeably?


There are various situations where they can be used for the same
purposes, but there are situations where you *have* to use WaitHandles
(waiting on multiple atomically etc) and many situations where it's
preferable to use Monitors (easier to lock with language support etc).

See http://www.pobox.com/~skeet/csharp/t...thandles.shtml for a
general description.

Usually, I'd prefer to use Monitors, but others prefer WaitHandles. I
suspect it depends on your background - I have a Java background, which
uses monitors.

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
If replying to the group, please do not mail me too
Jan 3 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.