Click here to Skip to main content
15,911,141 members
Home / Discussions / C#
   

C#

 
GeneralRe: work with a-GPS Pin
Saksida Bojan28-Jan-10 18:43
Saksida Bojan28-Jan-10 18:43 
GeneralRe: work with a-GPS Pin
Std_Net29-Jan-10 3:24
Std_Net29-Jan-10 3:24 
AnswerRe: work with a-GPS Pin
Std_Net29-Jan-10 5:48
Std_Net29-Jan-10 5:48 
Questionmulti-threading in c# Pin
lord_laurent_r28-Jan-10 6:31
lord_laurent_r28-Jan-10 6:31 
AnswerRe: multi-threading in c# Pin
Luc Pattyn28-Jan-10 7:36
sitebuilderLuc Pattyn28-Jan-10 7:36 
GeneralRe: multi-threading in c# Pin
lord_laurent_r30-Jan-10 20:21
lord_laurent_r30-Jan-10 20:21 
GeneralRe: multi-threading in c# Pin
Luc Pattyn31-Jan-10 2:39
sitebuilderLuc Pattyn31-Jan-10 2:39 
GeneralRe: multi-threading in c# Pin
lord_laurent_r31-Jan-10 20:23
lord_laurent_r31-Jan-10 20:23 
To explain more, I have one example. I have 3 (but it can be more) port COM. With my application the goal is to do at the same time:
Send message every 50ms to COM1 (time interval is defined by the user in a user interface)
Send message every 75ms to COM2
Send message every 50ms to COM3
For sending, I use one Timer for each port COM (= 3 thread),each thread wake up at the time defined by the user (i.e. one at 50ms, one at 75ms and the last one at 50ms).
So if you send message, you receive answer. It seems that we need a thread for each port COM to receive data (we don't know when the data is coming back). The thread of reception sleep until a data is received. When a message is received, the thread wake up, we push the message into a list and the thread sleep to the next reception.
Another thread check the list of message in reception and log the info.
I know that the thread is expensive and this is my problem. Now I use 2 thread by devices (one for sending, one for reception) and one thread to check the data and log it. This is the reason for what I want to change for a service. I think that one service by device can be used and so reduce to max 2-3 thread for each service. I think that the service have one process for him.
GeneralRe: multi-threading in c# Pin
Luc Pattyn1-Feb-10 2:17
sitebuilderLuc Pattyn1-Feb-10 2:17 
GeneralRe: multi-threading in c# Pin
lord_laurent_r1-Feb-10 2:37
lord_laurent_r1-Feb-10 2:37 
GeneralRe: multi-threading in c# Pin
Luc Pattyn1-Feb-10 2:52
sitebuilderLuc Pattyn1-Feb-10 2:52 
GeneralRe: multi-threading in c# Pin
lord_laurent_r1-Feb-10 5:01
lord_laurent_r1-Feb-10 5:01 
QuestionControl derived from Listbox not drawing properly Pin
Russell Jones28-Jan-10 6:19
Russell Jones28-Jan-10 6:19 
AnswerRe: Control derived from Listbox not drawing properly Pin
Saksida Bojan28-Jan-10 7:54
Saksida Bojan28-Jan-10 7:54 
GeneralRe: Control derived from Listbox not drawing properly Pin
Russell Jones28-Jan-10 8:23
Russell Jones28-Jan-10 8:23 
GeneralRe: Control derived from Listbox not drawing properly Pin
Saksida Bojan28-Jan-10 8:28
Saksida Bojan28-Jan-10 8:28 
QuestionHow to handle Enter key... Pin
mukundkallapur28-Jan-10 5:33
mukundkallapur28-Jan-10 5:33 
AnswerRe: How to handle Enter key... Pin
OriginalGriff28-Jan-10 5:43
mveOriginalGriff28-Jan-10 5:43 
AnswerRe: How to handle Enter key... Pin
Alex Manolescu28-Jan-10 8:16
Alex Manolescu28-Jan-10 8:16 
QuestionGetting info from database in gridview Pin
Bizcrack28-Jan-10 4:03
Bizcrack28-Jan-10 4:03 
AnswerRe: Getting info from database in gridview Pin
loyal ginger28-Jan-10 4:14
loyal ginger28-Jan-10 4:14 
AnswerRe: Getting info from database in gridview Pin
kevinnicol28-Jan-10 4:42
kevinnicol28-Jan-10 4:42 
GeneralRe: Getting info from database in gridview Pin
OriginalGriff28-Jan-10 5:12
mveOriginalGriff28-Jan-10 5:12 
GeneralRe: Getting info from database in gridview Pin
dan!sh 28-Jan-10 5:48
professional dan!sh 28-Jan-10 5:48 
AnswerRe: Getting info from database in gridview Pin
dan!sh 28-Jan-10 5:46
professional dan!sh 28-Jan-10 5:46 

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.