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

WaitAny pattern.

I am looking to do my own WaitAny. Have N producer objects that have
internal consumer Q. Can do blocking read or async read (using own
asyncresult object) of any 1 producer - that works fine. But now I want an
efficient way to do a WaitAny a list of producer objects, so the first
producer to get an item, wins the WaitAny and is returned - the other
losers, will cancel themselves and keep the item in their respective Qs. I
am thinking about posting async reads to every object in the list, but
wondering how to capture first producer and cancel the rest in an atomic
way. Any patterns out their or other advise? tia

--
William Stacey [C# MVP]

Oct 30 '06 #1
0 1326

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

Similar topics

8
by: gsv2com | last post by:
One of my weaknesses has always been pattern matching. Something I definitely need to study up on and maybe you guys can give me a pointer here. I'm looking to remove all of this code and just...
1
by: pokémon | last post by:
Can someone please post a working example of how to use the WaitAny() method. Thanks.
0
by: qiangdi_he | last post by:
Hi, Pals, I am using WaitAny( ) to wait for the events triggered by a timer. But it seems like that when the timer's interval elapsed, and the event was set, but WaitAny is still waiting there....
34
by: Steven Nagy | last post by:
So I was needing some extra power from my enums and implemented the typesafe enum pattern. And it got me to thinking... why should I EVER use standard enums? There's now a nice little code...
11
by: td0g03 | last post by:
Hello, I just have a few questions. The first one be how would you print a pattern. I could use the if else, but I remember my teacher talking about something like for(i=1;i<=size;i) ...
1
by: halekio | last post by:
Hi all, Please bear with me as I've only started programming in C# 2 weeks ago and this is my first contact with OOP. I ran into a situation where I needed to catch an event in an object that...
1
by: archana | last post by:
Hi all, can anyone tell me exact meaning of exitcontext of waithandle.waitany. What exactly synchronization domain means? i am having one windows application in which i creating some thread...
1
by: archana | last post by:
Hi all, can anyone tell me exact meaning of exitcontext of waithandle.waitany. What exactly synchronization domain means? i am having one windows application in which i creating some thread...
1
by: subhalalitha | last post by:
There is a requirement in our system. There is one Transaction Monitoring thread which wakes up after every 30 sec and checks for the requests that didnot get responses for "2 min" and sends...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...

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.