Click here to Skip to main content
15,900,110 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralStrings and strange characters Pin
1-Apr-02 22:37
suss1-Apr-02 22:37 
GeneralOups sorry, bad post !! Pin
1-Apr-02 22:47
suss1-Apr-02 22:47 
GeneralHey-now to all registry Gurus! Pin
BlackSmith1-Apr-02 22:29
BlackSmith1-Apr-02 22:29 
GeneralRe: Hey-now to all registry Gurus! Pin
Jon Hulatt1-Apr-02 23:35
Jon Hulatt1-Apr-02 23:35 
GeneralMemory management Pin
Dominik Reichl1-Apr-02 22:21
Dominik Reichl1-Apr-02 22:21 
GeneralRe: Memory management Pin
Christian Graus1-Apr-02 22:26
protectorChristian Graus1-Apr-02 22:26 
GeneralRe: Memory management Pin
Jon Hulatt1-Apr-02 23:40
Jon Hulatt1-Apr-02 23:40 
GeneralMultithreading Synchronization Pin
1-Apr-02 21:19
suss1-Apr-02 21:19 
Hi,

I use VC++ 6.0 (SP5) (i use MFC), and wish to design a multithreaded application.
I have the following problem :

for (int i = 0; i < N; i++)
{

// Launch may be 4 or 5 threads
AfxBeginThread(thread1);
AfxBeginThread(thread2);
AfxBeginThread(thread3);
AfxBeginThread(thread4);

}

but i would like to execute ONLY ONE thread at time. (if i do not synchronize them, i will have 4*N threads at the same time !!!).
I am confused : what should i use : CSemaphore, CEvent, WaitForSingleObject(), WaitForMultipleObjects()....

Can you help me !

Thanks.
GeneralRe: Multithreading Synchronization Pin
Joaquín M López Muñoz1-Apr-02 21:28
Joaquín M López Muñoz1-Apr-02 21:28 
GeneralRe: Multithreading Synchronization Pin
Jon Hulatt1-Apr-02 23:41
Jon Hulatt1-Apr-02 23:41 
GeneralRe: Multithreading Synchronization Pin
Tim Smith2-Apr-02 2:11
Tim Smith2-Apr-02 2:11 
GeneralRe: Multithreading Synchronization Pin
2-Apr-02 2:22
suss2-Apr-02 2:22 
GeneralRe: Multithreading Synchronization Pin
Tim Smith2-Apr-02 3:27
Tim Smith2-Apr-02 3:27 
GeneralRe: Multithreading Synchronization Pin
Joaquín M López Muñoz3-Apr-02 7:39
Joaquín M López Muñoz3-Apr-02 7:39 
GeneralHotkey into OnKeyDown Pin
1-Apr-02 21:10
suss1-Apr-02 21:10 
GeneralRe: Hotkey into OnKeyDown Pin
1-Apr-02 21:15
suss1-Apr-02 21:15 
GeneralInsert string that containts character ' Pin
Irina Tseitlin1-Apr-02 20:57
Irina Tseitlin1-Apr-02 20:57 
GeneralRe: Insert string that containts character ' Pin
Christian Graus1-Apr-02 21:05
protectorChristian Graus1-Apr-02 21:05 
GeneralRe: Insert string that containts character ' Pin
Jon Hulatt1-Apr-02 23:45
Jon Hulatt1-Apr-02 23:45 
GeneralGreenTea P2P decentralized computing platform Pin
1-Apr-02 20:36
suss1-Apr-02 20:36 
General16Bit -> 8 Bit Warning Loss of Data Pin
MarkPQ1-Apr-02 18:06
MarkPQ1-Apr-02 18:06 
GeneralRe: 16Bit -> 8 Bit Warning Loss of Data Pin
MarkPQ1-Apr-02 18:23
MarkPQ1-Apr-02 18:23 
GeneralRe: 16Bit -> 8 Bit Warning Loss of Data Pin
Shog91-Apr-02 18:26
sitebuilderShog91-Apr-02 18:26 
GeneralListCtrl Pin
1-Apr-02 17:42
suss1-Apr-02 17:42 
GeneralRe: ListCtrl Pin
Michael Dunn1-Apr-02 21:06
sitebuilderMichael Dunn1-Apr-02 21:06 

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.