473,406 Members | 2,745 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,406 software developers and data experts.

release all waiting threads in .NET?

Hello,
I need to use the functionality of an AutoResetEvent in that it should
normally be non-signalled, but I want something to be able to release all the
waiting threads when I call Set, however AutoResetEvent.Set only releases one
thread.
ManualResetEvent isn't really appropriate because it should remain
non-signalled, i.e. when any thread calls WaitOne() it always needs to block
until 'nudged'.
Is ManualResetEvent.Set() immediately followed by ManaulResetEvent.Reset()
the only option?
I really want something like ManualResetEvent.Pulse(), but it doesn't exist.

Any ideas?
Thanks

Jan 26 '07 #1
0 1183

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

Similar topics

4
by: John P. Speno | last post by:
So you have this problem, and you decide to use threads to solve it... System is Python 2.3.3 on Solaris 9. I'm using the classic Python thread model. Main thread puts stuff into a...
5
by: bughunter | last post by:
Hi, Consider this code: ---- Monitor.Pulse(oLock); Monitor.Exit(oLock); ---- If a thread was waiting on oLock then will the current thread
3
by: Douwe | last post by:
I'm trying to write a piece of C code that has two threads: The first thread waits for a socket connection. The second thread is in a continues cycle waiting for an period of time (lets say 500 ms)...
1
by: Carlos Lozano | last post by:
Hi, I have a multithreading application that reads and writes to com ports. The debug version works with no problems, but the release version don't. They are the same code, the difference is...
3
by: Elhurzen | last post by:
X-No-Archive: Yes >From what I understand, if multiple threads are waiting on a ManualResetEvent after calling WaitOne(), only one thread is guaranteed to be signaled when Set() is called on that...
1
by: =?Utf-8?B?QmVu?= | last post by:
Hello, I need to use the functionality of an AutoResetEvent in that it should normally be non-signalled, but I want something to be able to release all the waiting threads when I call Set, however...
2
by: Flyzone | last post by:
I have a list of parameters. I need to run in thread a command, one thread for one parameter. So i made a for loop, creating 5 threads and waiting their stop with: for parameter in parameters ...
4
by: O.B. | last post by:
I have a socket configured as TCP and running as a listener. When I close socket, it doesn't always free up the port immediately. Even when no connections have been made to it. So when I open...
2
by: Piotr Sobolewski | last post by:
Hello, I have such program: import time import thread def f():     global lock     while True:         lock.acquire()         print thread.get_ident()
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: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
jinu1996
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...
0
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...
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.