Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / C# / June 2006

Tip: Looking for answers? Try searching our database.

How to prevent Events from being queued?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Ole - 30 Jun 2006 15:02 GMT
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
Ole - 30 Jun 2006 15:08 GMT
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

> 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
[quoted text clipped - 3 lines]
> Thanks
> Ole
Greg Young - 30 Jun 2006 21:43 GMT
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
> OK - found a solution - I just disabled the event as soon as entering the
> handler and enabled it at the end again - works well!
[quoted text clipped - 8 lines]
>> Thanks
>> Ole

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.