473,402 Members | 2,046 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,402 software developers and data experts.

Events(WaitHandle) and Monitor

Are AutoReset Event/ManualReset Event and Monitor.Pulse used for the same

Can they be used interchangeably?
Jan 3 '06 #1
1 1614
Tim <Ti*@discussions.microsoft.com> wrote:
Are AutoReset Event/ManualReset Event and Monitor.Pulse used for the same

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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

by: Waleed AlRashoud | last post by:
Hi All, I hvae worker class to manage the application inside worker : worker creates (n) number of threads to do IO operations. The Problem Is: to handle all threads : , , I have to...
by: ej1002 | last post by:
Hi I have developed a Windows Application(C# Windows Form) which will get the IFrame Source of the page it is navigating using Webbrowser Control. Now I want do this in ASP.Net web application(C#...
by: Jay Douglas | last post by:
Greetings, I have a Windows form application that (naturally) instantiates all sorts of objects. I have a base object that contains an event. Lots of other objects inherit from this event. ...
by: MIke Brown | last post by:
Hello all, I've been searching for a solution on google for a problem related to creating events from a worker thread, with no luck.. Basically, the problem is when my events are caught by a...
by: Bryce K. Nielsen | last post by:
I have an object that starts a thread to do a "process". One of the steps inside this thread launches 12 other threads via a Delegate.BeginInvoke to process. After these 12 threads are launched,...
by: kalyanilovesme | last post by:
Hi, I am running my application in two minitors.In one monitor.............if it is idle for some time the screensaver wil come(I wrote the code for this using system dll functions) . Now my...
by: rjha94 | last post by:
$db2evmon -db DEV1926 -evm DB2DETAILDEADLOCK was showing data from all the runs whereas i want the data just for a single run. To capture fresh events, I deleted the old events file. caveat was, I...
by: =?Utf-8?B?VHJlY2l1cw==?= | last post by:
Hello, Newsgroupians: Again, I'm still migrating from Win32 to C#. I've a question regarding some event handling in C#. I have created an EventWaitHandle object and pass that to my worker...
by: =?Utf-8?B?VHJlY2l1cw==?= | last post by:
Hello, Newsgroupians: I'm still trying to work on synchronization of events. I think I can do it using WaitHandle, EventWaitHandle, or Mutex. However, is it possible to determine if the state...
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.