Click here to Skip to main content
15,896,482 members
Home / Discussions / C#
   

C#

 
AnswerRe: Performance measure on inline methods Pin
Berlus16-Jun-10 18:59
Berlus16-Jun-10 18:59 
QuestionCompact datagrid Pin
jashimu16-Jun-10 8:44
jashimu16-Jun-10 8:44 
AnswerRe: Compact datagrid Pin
hammerstein0516-Jun-10 10:33
hammerstein0516-Jun-10 10:33 
QuestionThread.Join Pin
Endien16-Jun-10 6:26
Endien16-Jun-10 6:26 
AnswerRe: Thread.Join Pin
harold aptroot16-Jun-10 6:33
harold aptroot16-Jun-10 6:33 
GeneralRe: Thread.Join Pin
Endien16-Jun-10 6:48
Endien16-Jun-10 6:48 
GeneralRe: Thread.Join Pin
harold aptroot16-Jun-10 6:54
harold aptroot16-Jun-10 6:54 
GeneralRe: Thread.Join Pin
Endien16-Jun-10 7:12
Endien16-Jun-10 7:12 
Maybe i should explain what i'm trying to do :

I have 4 GSM Modems. 3 Modems for both execute and read the result from AT command and 1 Modem for receive sms from clients.

Clients will send an sms with certain format that can be parse by the application.
Since a GSM Modem can't execute 2 AT command at the same time and also i need the answer from the GSM modem for further process, that's why i need the AT command run by an order.

Clients will send the sms at unpredictable time. There's an event to handle "receive sms".
after an sms received, it will check the sms format. If the format is correct then the thread will be called and run the AT command. The answer from AT command is also unpredictable (sometime fast and sometime it will take a longer time). At the time 1st thread execute AT command, there is new sms came in. the 2nd thread must wait until the 1st thread is finish. And so on.

This is just a small code trying to simulate the situation.

I think Thread.Join is the answer but it will make the UI "halt" (it maybe not a button but a tab page control etc), and that what i'm trying to avoid.

Hope this explanation help understand the problem.
GeneralRe: Thread.Join Pin
harold aptroot16-Jun-10 7:15
harold aptroot16-Jun-10 7:15 
GeneralRe: Thread.Join Pin
Chris Trelawny-Ross16-Jun-10 8:09
Chris Trelawny-Ross16-Jun-10 8:09 
GeneralRe: Thread.Join Pin
Endien16-Jun-10 8:31
Endien16-Jun-10 8:31 
AnswerRe: Thread.Join Pin
Adam R Harris16-Jun-10 6:37
Adam R Harris16-Jun-10 6:37 
GeneralRe: Thread.Join Pin
Endien16-Jun-10 6:52
Endien16-Jun-10 6:52 
GeneralRe: Thread.Join Pin
Adam R Harris16-Jun-10 8:18
Adam R Harris16-Jun-10 8:18 
GeneralRe: Thread.Join Pin
Endien16-Jun-10 8:26
Endien16-Jun-10 8:26 
GeneralRe: Thread.Join Pin
Adam R Harris16-Jun-10 8:46
Adam R Harris16-Jun-10 8:46 
GeneralRe: Thread.Join Pin
Endien16-Jun-10 8:57
Endien16-Jun-10 8:57 
AnswerRe: Thread.Join Pin
David Skelly16-Jun-10 6:47
David Skelly16-Jun-10 6:47 
GeneralRe: Thread.Join Pin
Endien16-Jun-10 8:35
Endien16-Jun-10 8:35 
AnswerRe: Thread.Join Pin
Luc Pattyn16-Jun-10 6:57
sitebuilderLuc Pattyn16-Jun-10 6:57 
GeneralRe: Thread.Join Pin
Endien16-Jun-10 7:30
Endien16-Jun-10 7:30 
GeneralRe: Thread.Join Pin
Luc Pattyn16-Jun-10 7:34
sitebuilderLuc Pattyn16-Jun-10 7:34 
QuestionLength of a column of an SQL Table Pin
Sebastian T Xavier16-Jun-10 5:58
Sebastian T Xavier16-Jun-10 5:58 
AnswerRe: Length of a column of an SQL Table Pin
Adam R Harris16-Jun-10 6:43
Adam R Harris16-Jun-10 6:43 
AnswerRe: Length of a column of an SQL Table Pin
PIEBALDconsult16-Jun-10 13:29
mvePIEBALDconsult16-Jun-10 13:29 

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

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