Re: How to prevent Events from being queued?
- From: "Greg Young" <druckdruckREMOVEgoose@xxxxxxxxxxx>
- Date: Fri, 30 Jun 2006 16:43:55 -0400
This is not necesarily a solution it depends on how the event is being
dispatched.
The event could be dispatched concurrently on multiple threads in which case
you code could still end up being re-entrant.
Cheers,
Greg Young
MVP - C#
http://codebetter.com/blogs/gregyoung
"Ole" <ole@xxxxxxxxxx> wrote in message
news:%23ux1C7EnGHA.1248@xxxxxxxxxxxxxxxxxxxxxxx
OK - found a solution - I just disabled the event as soon as entering the
handler and enabled it at the end again - works well!
Ole
"Ole" <ole@xxxxxxxxxx> wrote in message
news:OEvYb3EnGHA.816@xxxxxxxxxxxxxxxxxxxxxxx
The pin_changed event from serial port is being queued while the
eventhandler is busy, but how do I change it so that the new event is
ignored instead while eventhandler is busy (I want to eliminate switch
noise)?
Thanks
Ole
.
- References:
- How to prevent Events from being queued?
- From: Ole
- Re: How to prevent Events from being queued?
- From: Ole
- How to prevent Events from being queued?
- Prev by Date: Re: xml control visibility
- Next by Date: Re: Windows Service - Event Log
- Previous by thread: Re: How to prevent Events from being queued?
- Next by thread: Reading / Writing Data into / out of a C# Structure
- Index(es):
Relevant Pages
|