Click here to Skip to main content

Silverlight / WPF

 
AnswerRe: Firing an ICommand from a Style? PinmemberCracked-Down7-Mar-13 3:29 
QuestionExtended Toolkit Editor Templates PinmemberJohn Simmons / outlaw programmer22-Feb-13 7:17 
QuestionIs Visual studio 2012 using WPF's WindowChrome trick ? PinmemberDavid Diamond20-Feb-13 23:45 
QuestionBuilding a GUI in WPF Pinmembercolumbos1492720-Feb-13 22:32 
AnswerRe: Building a GUI in WPF PinmentorWayne Gaylard20-Feb-13 23:15 
QuestionAfter Upagrading Silverlight from .NET 4 to 4.5 WCF Stopped working PinmemberVuyiswa Maseko20-Feb-13 7:54 
AnswerRe: After Upagrading Silverlight from .NET 4 to 4.5 WCF Stopped working PinmemberVuyiswa Maseko20-Feb-13 9:16 
QuestionEvent Handling between Threads PinmemberAeroClassics19-Feb-13 12:34 
I am asking this in the WPF forum because this is a WPF app but this question does not necessarily pertain to WPF, i.e. the UI thread.
 
Here is the scenario:
I have three (3) threads. Thread One (1) call it the Master Thread; Thread Two (2) is a Ethernet Comm thread; and Thread Three (3) is a GPIB comm thread. Both communication threads handle asynchronous communications from remote entities. At this time there is only one entity hanging off each comm type.
 
I have implemented a mix of EventWaitHandles and delegates. This all works pretty well. Just think this architecture is a bit ...... ugly. So which one is better/safer?
 
My concern is as follows. With delegates, for example, the Master thread registers an event handler with Thread 2 and an event handler with Thread 3 for messages that come in. Obviously data could come in near simultaneously. So Thread 2 encases a message in an EventArg and invokes the event on the Master thread. The Master Thread begins processing and then Thread 3 encases its message in an EventArg and invokes the event on the Master Thread. What happens? Does the Master Thread stop in the middle of handling the first event to service the second one? Does the second event wait until the first event is processed? What if Thread 2 gets another message and invokes the event again while the Master is processing the first event?
 
I wonder if using a queue and an manual Reset EventWaitHandle is not a better idea as the Thread 2 can check the status and wait until it is reset before putting the message in the queue and setting the EventWaitHandle again.
 
Opinions, please?
 
Thanks,
Doug
I am a Traveler
of both Time and Space

AnswerRe: Event Handling between Threads PinmemberSledgeHammer0119-Feb-13 13:57 
GeneralRe: Event Handling between Threads PinmemberAeroClassics20-Feb-13 5:42 
Questionpanel with sorting animation Pinmembertetrapack19-Feb-13 10:00 
QuestionI know what's ItemTemplate, what's PropertyTrigger,DataTrigger and MultiTrigger but What's "TemplateTrigger"? Pinmemberdevvvy15-Feb-13 19:29 
QuestionAbout Silver light Sql Data Connection Pinmembervijaynet1014-Feb-13 20:14 
AnswerRe: About Silver light Sql Data Connection PinmemberMycroft Holmes15-Feb-13 1:45 
GeneralRe: About Silver light Sql Data Connection Pinmembervijaynet1015-Feb-13 5:30 
GeneralRe: About Silver light Sql Data Connection PinprotectorPete O'Hanlon15-Feb-13 6:46 
AnswerRe: About Silver light Sql Data Connection PinmvpAbhinav S15-Feb-13 18:01 
QuestionIs it safe to change datagridcolumn cell style at run time? PinmemberDr. Hurol Aslan14-Feb-13 18:03 
AnswerRe: Is it safe to change datagridcolumn cell style at run time? PinmemberMarco Bertschi15-Feb-13 4:12 
GeneralRe: Is it safe to change datagridcolumn cell style at run time? PinmemberDr. Hurol Aslan15-Feb-13 9:03 
GeneralRe: Is it safe to change datagridcolumn cell style at run time? PinmemberMarco Bertschi15-Feb-13 9:04 
GeneralRe: Is it safe to change datagridcolumn cell style at run time? PinmemberMycroft Holmes15-Feb-13 13:37 
GeneralRe: Is it safe to change datagridcolumn cell style at run time? PinmemberDr. Hurol Aslan15-Feb-13 15:43 
GeneralRe: Is it safe to change datagridcolumn cell style at run time? PinmemberMycroft Holmes15-Feb-13 15:53 
QuestionSend mail at a specific time Pinmemberslobo32014-Feb-13 3:27 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.


Advertise | Privacy | Mobile
Web01 | 2.8.150123.1 | Last Updated 27 Jan 2015
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid