Click here to Skip to main content
11,639,178 members (68,401 online)

Silverlight / WPF

 
AnswerRe: Firing an ICommand from a Style? Pin
Cracked-Down7-Mar-13 2:29
memberCracked-Down7-Mar-13 2:29 
QuestionExtended Toolkit Editor Templates Pin
John Simmons / outlaw programmer22-Feb-13 6:17
memberJohn Simmons / outlaw programmer22-Feb-13 6:17 
QuestionIs Visual studio 2012 using WPF's WindowChrome trick ? Pin
David Diamond20-Feb-13 22:45
memberDavid Diamond20-Feb-13 22:45 
QuestionBuilding a GUI in WPF Pin
columbos1492720-Feb-13 21:32
membercolumbos1492720-Feb-13 21:32 
AnswerRe: Building a GUI in WPF Pin
Wayne Gaylard20-Feb-13 22:15
mentorWayne Gaylard20-Feb-13 22:15 
QuestionAfter Upagrading Silverlight from .NET 4 to 4.5 WCF Stopped working Pin
Vuyiswa Maseko20-Feb-13 6:54
memberVuyiswa Maseko20-Feb-13 6:54 
AnswerRe: After Upagrading Silverlight from .NET 4 to 4.5 WCF Stopped working Pin
Vuyiswa Maseko20-Feb-13 8:16
memberVuyiswa Maseko20-Feb-13 8:16 
QuestionEvent Handling between Threads Pin
AeroClassics19-Feb-13 11:34
memberAeroClassics19-Feb-13 11: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 Pin
SledgeHammer0119-Feb-13 12:57
memberSledgeHammer0119-Feb-13 12:57 
GeneralRe: Event Handling between Threads Pin
AeroClassics20-Feb-13 4:42
memberAeroClassics20-Feb-13 4:42 
Questionpanel with sorting animation Pin
tetrapack19-Feb-13 9:00
membertetrapack19-Feb-13 9:00 
QuestionI know what's ItemTemplate, what's PropertyTrigger,DataTrigger and MultiTrigger but What's "TemplateTrigger"? Pin
devvvy15-Feb-13 18:29
memberdevvvy15-Feb-13 18:29 
QuestionAbout Silver light Sql Data Connection Pin
vijaynet1014-Feb-13 19:14
membervijaynet1014-Feb-13 19:14 
AnswerRe: About Silver light Sql Data Connection Pin
Mycroft Holmes15-Feb-13 0:45
memberMycroft Holmes15-Feb-13 0:45 
GeneralRe: About Silver light Sql Data Connection Pin
vijaynet1015-Feb-13 4:30
membervijaynet1015-Feb-13 4:30 
GeneralRe: About Silver light Sql Data Connection Pin
Pete O'Hanlon15-Feb-13 5:46
protectorPete O'Hanlon15-Feb-13 5:46 
AnswerRe: About Silver light Sql Data Connection Pin
Abhinav S15-Feb-13 17:01
mvpAbhinav S15-Feb-13 17:01 
QuestionIs it safe to change datagridcolumn cell style at run time? Pin
Dr. Hurol Aslan14-Feb-13 17:03
memberDr. Hurol Aslan14-Feb-13 17:03 
AnswerRe: Is it safe to change datagridcolumn cell style at run time? Pin
Marco Bertschi15-Feb-13 3:12
memberMarco Bertschi15-Feb-13 3:12 
GeneralRe: Is it safe to change datagridcolumn cell style at run time? Pin
Dr. Hurol Aslan15-Feb-13 8:03
memberDr. Hurol Aslan15-Feb-13 8:03 
GeneralRe: Is it safe to change datagridcolumn cell style at run time? Pin
Marco Bertschi15-Feb-13 8:04
memberMarco Bertschi15-Feb-13 8:04 
GeneralRe: Is it safe to change datagridcolumn cell style at run time? Pin
Mycroft Holmes15-Feb-13 12:37
memberMycroft Holmes15-Feb-13 12:37 
GeneralRe: Is it safe to change datagridcolumn cell style at run time? Pin
Dr. Hurol Aslan15-Feb-13 14:43
memberDr. Hurol Aslan15-Feb-13 14:43 
GeneralRe: Is it safe to change datagridcolumn cell style at run time? Pin
Mycroft Holmes15-Feb-13 14:53
memberMycroft Holmes15-Feb-13 14:53 
QuestionSend mail at a specific time Pin
slobo32014-Feb-13 2:27
memberslobo32014-Feb-13 2: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
Web04 | 2.8.150728.1 | Last Updated 30 Jul 2015
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid