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

Event Queues

I couldn't find the info I was looking for anwhere else so I'll try here.

I have a custom control that calls a delegate method when a SelectHandler
event is fired. The SelectHandler method adds a ResetHandler method to the
control's ResetHandlers. My question is; will multiple instances of the
ResetHandler method be added to the event queue or is each method in the
queue unique?

If I knew how to get at the event handler queue I'd look for myself.
Unfortunately, I don't have a clue as to how pointers to delegates are
stored.
Jul 1 '07 #1
2 1768
Chuck B <ch**********@sbcglobal-NO-SPAM.netwrote:
I couldn't find the info I was looking for anwhere else so I'll try here.

I have a custom control that calls a delegate method when a SelectHandler
event is fired. The SelectHandler method adds a ResetHandler method to the
control's ResetHandlers. My question is; will multiple instances of the
ResetHandler method be added to the event queue or is each method in the
queue unique?
It's not entirely clear to me what you mean. Could you post some code?
If I knew how to get at the event handler queue I'd look for myself.
Unfortunately, I don't have a clue as to how pointers to delegates are
stored.
http://pobox.com/~skeet/csharp/events.html may help a bit.

--
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
Jul 1 '07 #2
On Sun, 01 Jul 2007 06:01:44 -0700, Chuck B
<ch**********@sbcglobal-NO-SPAM.netwrote:
I have a custom control that calls a delegate method when a SelectHandler
event is fired. The SelectHandler method adds a ResetHandler method to
the
control's ResetHandlers. My question is; will multiple instances of the
ResetHandler method be added to the event queue or is each method in the
queue unique?
I recommend that you take a look at Jon's web page that he referred you
to. But in the meantime, I can tell you this: every time you add a
delegate reference to an event, a new copy of that reference is added to
the event. If you add the same delegate three times, then when you go to
execute the event handlers, the delegate will be called three times.

Whether this answers your question or not, I don't know. It's not easy to
figure out what exactly you're asking. But hopefully, that helps.

Pete
Jul 1 '07 #3

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

Similar topics

2
by: Marcin Kielar | last post by:
hello i'm searching for algorithm able to detect and resolve conflicts during recursive event propagation. I'd like to implement small message passing framework without using message queue -...
0
by: Aki Niimura | last post by:
Hello everyone. I'm trying to control a program from a Python program using IPC. Although using a socket is a common choice for such applications, I would like to use SysV message queues...
0
by: badtemper | last post by:
Is there any way to use perl or any other programming language to perform a "qchk -A" from a web page and see the listing? My problem is that I manage the network for a medical facility that is...
8
by: Mark | last post by:
Hi, I'm looking for some ideas on how to build a very simple Event processing framework in my C++ app. Here is a quick background ... I'm building a multithreaded app in C++ (on Linux) that...
1
by: saleem | last post by:
Dear friends, I am working on the problem which deals with the data management of requests and how should we match the responses for the requests to compare the correct Response. my problem...
6
by: Iain | last post by:
I've got a (VC++ 6.0) com object which does something asynchronously (writes a DVD image, actually). It rasies COM events to indicate progress, including completion. I've got this running in a...
7
by: copx | last post by:
How do you implement an event queue in C? The problem I had is that events needed pointers to the objects they affect and I do not know any way to check if pointers are actually valid in C. The...
4
by: Anis | last post by:
hi, i want to know what is event that windows log in "Event Log". i have read that there r some services that log the event, but at the base level what exactly event is ? and can we make our...
1
by: Safalra | last post by:
A long time ago when I used a browser that didn't support the shift or unshift methods of the array object, I came up with an implementation of queues that guaranteed amortised constant time...
5
by: nt5515 | last post by:
im trying to write a program that store a binary tree of possible events in an array. i need to be able to sort the the Events in the array based on the previous event that caused it by the time...
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?
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
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
Oralloy
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,...
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
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,...
0
isladogs
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.