473,396 Members | 1,786 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,396 software developers and data experts.

Manual Reset Event

Hello,
How can I know that the Manual Reset Event object done WaitOne(). I have
a condition and I want to do Set() to Manual Reset Event in it but I
have to know that there WaitOne() was done on it before. How can I know
that?
Thank you!

*** Sent via Developersdex http://www.developersdex.com ***
Mar 21 '06 #1
2 12542
On Tue, 21 Mar 2006 03:38:14 -0800, juli jul wrote:
How can I know that the Manual Reset Event object done WaitOne(). I have
a condition and I want to do Set() to Manual Reset Event in it but I
have to know that there WaitOne() was done on it before. How can I know
that?


Why would you want to know that? The whole point of a manual reset event is
that once it has been set, it remains in that state until you manually
reset it. So it doesn't matter whether some other thread has called WaitOne
or not. When you're done with whatever task needs to be completed before
other thread can carry on with their work, just call Set(). If there was
other threads waiting, they will be realeased. If other threads arrive
later and call WaitOne(), they won't block since your ManualResetEvent has
already been signaled.
Mar 21 '06 #2
Joe
One solution is to define an additional manual or auto-reset event
which you Set just before calling WaitOne() on the ManualResetEvent.
You can use WaitHandle.SignalAndWait to make the operation atomic.

Are you trying to implement a "ready" or acknowledgement signal? Maybe
there's a simpler solution to what you're trying to achieve.

Joe

Mar 21 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: John Smith | last post by:
Hello. Can anybody read this and come up with the solution? I would appreciate any input. In my form I have two fields (Field1 is select and Field2 is text input). Field1 has "onchange" event...
2
by: Charles M. Fish, Sr. | last post by:
I’m so tired from banging this problem around all day, I hope I can explain it succinctly & accurately. I want to execute a function immediately following a click on <input type="RESET"... ...
1
by: Joe Bloggs | last post by:
I have a form which includes a checkbox field. I need to add a reset, I add a HTML reset it works fine before I submit the form but not after. I know I must add some code to reset the checkbox on...
1
by: NancyASAP | last post by:
Thought I'd share this since it took me a long time to get it working. Thanks to a bunch of contributers in Google Groups who shared javascript, etc. The question was: How can I put a reset...
4
by: Lee Chapman | last post by:
Hi, Can anyone tell me why in the code below, the call to ClearChildViewState() has no effect? To paraphrase the code: I'm using view state. I have a textbox and a submit button (and a label...
4
by: Charles Law | last post by:
I've been using monitors a bit lately (some of you may have heard ;-) ) and then up pop Manual and AutoResetEvents , and they look for all the world like the same thing. Are they...
2
by: sck10 | last post by:
Hello, I have 3 repeater controls referencing the same function below. What it is doing is testing to see if the first column repeats itself and if so, add a line with the managers name. The...
16
by: sreemati | last post by:
Hi everyone, This is the scenario: I have two button - Submit and Reset Submit is used for validation and after validation is passed it passes it to another form to enter into database. ...
11
by: newbie | last post by:
i have a form in which a hidden field (initial value as '0', and my javascript set it to '1' when an event is trigged). In the same form, i have a reset field. But I realized that the hidden field...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
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...
0
marktang
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,...
0
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...
0
tracyyun
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...
0
agi2029
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 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.