Click here to Skip to main content
16,008,719 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Good references on multithreading in C++ Pin
Steven Swart2-Oct-08 21:44
Steven Swart2-Oct-08 21:44 
GeneralRe: Good references on multithreading in C++ Pin
Hamid_RT3-Oct-08 0:55
Hamid_RT3-Oct-08 0:55 
QuestionThreads and Priority Pin
sunny_vc1-Oct-08 21:57
sunny_vc1-Oct-08 21:57 
AnswerRe: Threads and Priority Pin
Matthew Faithfull1-Oct-08 22:17
Matthew Faithfull1-Oct-08 22:17 
AnswerRe: Threads and Priority Pin
CPallini1-Oct-08 22:18
mveCPallini1-Oct-08 22:18 
AnswerRe: Threads and Priority Pin
Roger Stoltz1-Oct-08 22:24
Roger Stoltz1-Oct-08 22:24 
GeneralRe: Threads and Priority Pin
sunny_vc1-Oct-08 22:40
sunny_vc1-Oct-08 22:40 
AnswerRe: Threads and Priority Pin
Roger Stoltz1-Oct-08 23:03
Roger Stoltz1-Oct-08 23:03 
sunilkumar.d wrote:
Actually i have two threads.
One runs script file, which consists of some commands.
Each command to be sent to hardware via serial port and receive the result.
The other thread is serial port read thread.
If the Threadpriority is normal , my script file runs a bit slowly.


Have you considered why the script runs slowly?
What you do by increasing the thread priority is saying "when this thread runs it's more important than other threads and should not be disturbed". My point is that if this is a problem, your thread that executes the script is interrupted by other threads. If that's you problem, have you considered why it is so?

Have you by any chance written a call to ::Sleep() somewhere? If so, that is most likely your source of problem. Read the article I linked to in my previous post followed by this[^].


"It's supposed to be hard, otherwise anybody could do it!" - selfquote
"High speed never compensates for wrong direction!" - unknown


GeneralRe: Threads and Priority Pin
sunny_vc1-Oct-08 23:18
sunny_vc1-Oct-08 23:18 
AnswerRe: Threads and Priority Pin
Hamid_RT2-Oct-08 19:23
Hamid_RT2-Oct-08 19:23 
QuestionPrevent resize of custom taskbar (toolbar) Pin
AeJai1-Oct-08 10:15
AeJai1-Oct-08 10:15 
AnswerRe: Prevent resize of custom taskbar (toolbar) Pin
sashoalm1-Oct-08 21:57
sashoalm1-Oct-08 21:57 
Questionhow to get a line of text file Pin
nomi khan1-Oct-08 6:57
nomi khan1-Oct-08 6:57 
AnswerRe: how to get a line of text file Pin
CPallini1-Oct-08 7:41
mveCPallini1-Oct-08 7:41 
GeneralRe: how to get a line of text file Pin
nomi khan1-Oct-08 15:37
nomi khan1-Oct-08 15:37 
GeneralRe: how to get a line of text file Pin
David Crow1-Oct-08 17:07
David Crow1-Oct-08 17:07 
GeneralRe: how to get a line of text file Pin
CPallini1-Oct-08 21:28
mveCPallini1-Oct-08 21:28 
GeneralRe: how to get a line of text file Pin
Hamid_RT1-Oct-08 19:19
Hamid_RT1-Oct-08 19:19 
GeneralRe: how to get a line of text file Pin
CPallini1-Oct-08 21:26
mveCPallini1-Oct-08 21:26 
AnswerRe: how to get a line of text file Pin
Hamid_RT1-Oct-08 19:15
Hamid_RT1-Oct-08 19:15 
AnswerRe: how to get a line of text file Pin
Sandeep Saini SRE2-Oct-08 17:10
Sandeep Saini SRE2-Oct-08 17:10 
AnswerRe: how to get a line of text file Pin
kapardhi2-Oct-08 23:06
kapardhi2-Oct-08 23:06 
QuestionRedraw Pin
Sarriss1-Oct-08 3:00
Sarriss1-Oct-08 3:00 
AnswerRe: Redraw Pin
Steve Thresher1-Oct-08 3:25
Steve Thresher1-Oct-08 3:25 
GeneralRe: Redraw Pin
Sarriss1-Oct-08 3:40
Sarriss1-Oct-08 3:40 

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.