Click here to Skip to main content
15,891,136 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionRe: Problems synchronizing multiple threads?? Pin
Jun Du27-Jun-06 8:20
Jun Du27-Jun-06 8:20 
AnswerRe: Problems synchronizing multiple threads?? Pin
mikeorama1234527-Jun-06 8:39
mikeorama1234527-Jun-06 8:39 
QuestionRe: Problems synchronizing multiple threads?? Pin
David Crow27-Jun-06 9:09
David Crow27-Jun-06 9:09 
AnswerRe: Problems synchronizing multiple threads?? Pin
Michael Dunn27-Jun-06 11:44
sitebuilderMichael Dunn27-Jun-06 11:44 
GeneralRe: Problems synchronizing multiple threads?? Pin
Graham Bradshaw27-Jun-06 11:46
Graham Bradshaw27-Jun-06 11:46 
GeneralRe: Problems synchronizing multiple threads?? Pin
Jun Du28-Jun-06 3:45
Jun Du28-Jun-06 3:45 
GeneralRe: Problems synchronizing multiple threads?? Pin
John M. Drescher28-Jun-06 7:06
John M. Drescher28-Jun-06 7:06 
GeneralRe: Problems synchronizing multiple threads?? Pin
Jun Du28-Jun-06 9:03
Jun Du28-Jun-06 9:03 
My reply "I don't think so" is to Michael's comment that the originator wanted to prevent other threads from running. I think what the originator wanted (or needed) is sychronizing the tweo threads so that they output the same frame at a given time.

I see two issues mixed with the originator's question: real-time and synchronization. By real-time, I mean that the simulation time your program complete goes hand-in-hand with your wall clock, no faster no slower. Lets say you're simulating the traffic on a highway. You want your program to complete the simulation of one sencond traffic within one second time. Only this way you can acheive real-time. Multiple CPUs can help to acheive real-time through better parallelism. But if the computation is very simple, one CPU can do the job too. As you may notice now, parallelism is not a necessity in pursuing real-time.

Synchroniztion is a different issue. It is about the collaboration between two threads. It has nothing to do with how fast your CPU is. You don't need multiple CPUs to acheive synchronization. One of the major purposes for synchronization is protecting resources shared by more than one thread.


Best,
Jun

GeneralRe: Problems synchronizing multiple threads?? Pin
led mike27-Jun-06 9:18
led mike27-Jun-06 9:18 
GeneralRe: Problems synchronizing multiple threads?? [modified] Pin
Zac Howland27-Jun-06 9:31
Zac Howland27-Jun-06 9:31 
GeneralRe: Problems synchronizing multiple threads?? Pin
mikeorama1234527-Jun-06 9:53
mikeorama1234527-Jun-06 9:53 
GeneralRe: Problems synchronizing multiple threads?? Pin
Zac Howland27-Jun-06 10:12
Zac Howland27-Jun-06 10:12 
GeneralRe: Problems synchronizing multiple threads?? Pin
John M. Drescher27-Jun-06 10:17
John M. Drescher27-Jun-06 10:17 
AnswerRe: Problems synchronizing multiple threads?? Pin
valikac27-Jun-06 9:12
valikac27-Jun-06 9:12 
AnswerRe: Problems synchronizing multiple threads?? Pin
Michael Dunn27-Jun-06 9:47
sitebuilderMichael Dunn27-Jun-06 9:47 
GeneralRe: Problems synchronizing multiple threads?? Pin
pavanbabut29-Jun-06 12:11
pavanbabut29-Jun-06 12:11 
Questionbug of mouse_event() Pin
V_shr27-Jun-06 7:28
V_shr27-Jun-06 7:28 
QuestionCOM Port Acesss in VC++ Pin
tanksali27-Jun-06 6:17
tanksali27-Jun-06 6:17 
AnswerRe: COM Port Acesss in VC++ Pin
David Crow27-Jun-06 6:41
David Crow27-Jun-06 6:41 
AnswerRe: COM Port Acesss in VC++ Pin
mikeorama1234527-Jun-06 8:43
mikeorama1234527-Jun-06 8:43 
AnswerRe: COM Port Acesss in VC++ Pin
Hamid_RT27-Jun-06 19:17
Hamid_RT27-Jun-06 19:17 
QuestionMultiple string tables in exe Pin
Andre xxxxxxx27-Jun-06 6:06
Andre xxxxxxx27-Jun-06 6:06 
AnswerRe: Multiple string tables in exe Pin
Joe Woodbury27-Jun-06 6:15
professionalJoe Woodbury27-Jun-06 6:15 
GeneralRe: Multiple string tables in exe Pin
Andre xxxxxxx27-Jun-06 6:22
Andre xxxxxxx27-Jun-06 6:22 
GeneralRe: Multiple string tables in exe Pin
Joe Woodbury27-Jun-06 6:29
professionalJoe Woodbury27-Jun-06 6: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.