Click here to Skip to main content
15,902,299 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Generalsample of uninstallation Pin
includeh1015-Jan-04 4:46
includeh1015-Jan-04 4:46 
GeneralRe: sample of uninstallation Pin
l a u r e n15-Jan-04 6:00
l a u r e n15-Jan-04 6:00 
GeneralRe: sample of uninstallation Pin
includeh1015-Jan-04 6:20
includeh1015-Jan-04 6:20 
GeneralRe: sample of uninstallation Pin
l a u r e n15-Jan-04 6:24
l a u r e n15-Jan-04 6:24 
GeneralRe: sample of uninstallation Pin
includeh1015-Jan-04 6:44
includeh1015-Jan-04 6:44 
GeneralRe: sample of uninstallation Pin
l a u r e n15-Jan-04 6:45
l a u r e n15-Jan-04 6:45 
GeneralProblems calling JavaScript from VC++ Pin
ReneDalsgaard15-Jan-04 4:20
ReneDalsgaard15-Jan-04 4:20 
GeneralThreads.. Pin
Laing,James15-Jan-04 4:01
Laing,James15-Jan-04 4:01 
I wonder if anyone can advise me about the following.

I am currently working on an application that uses multiple worker threads to perform concurrent processing.
It requires 50+ workers (although it may require many more in the future), each instantiating an object to perform some processing.
I am using ::WaitForMultipleObjects() to wait for all the threads to terminate.
Now, some threads run very quickly as they do not have that much to do and so they tend to terminate even before the last worker thread has been dispatched.

As a result, the wait fails..
Do I assume correctly, that this occurs because the wait function determines that those threads that are already signalled and therefore have invalid handles are considered an error.

So, how do I contend with the fact that some threads may already be signalled before the wait gets called.
I would like to be able to wait until all the threads have completed before execeution of the main dispatching thread continues whether they are non-signalled or signalled before the wait is called.

Any comments or advice would be greatly appreciated.

James.
GeneralRe: Threads.. Pin
Mike Dimmick15-Jan-04 4:43
Mike Dimmick15-Jan-04 4:43 
GeneralRe: Threads.. Pin
Anonymous15-Jan-04 4:54
Anonymous15-Jan-04 4:54 
GeneralRe: Threads.. Pin
Diddy15-Jan-04 5:28
Diddy15-Jan-04 5:28 
GeneralRe: Threads.. Pin
Laing,James15-Jan-04 5:58
Laing,James15-Jan-04 5:58 
GeneralRe: Threads.. Pin
Diddy15-Jan-04 6:04
Diddy15-Jan-04 6:04 
GeneralRe: Threads.. Pin
Laing,James15-Jan-04 6:07
Laing,James15-Jan-04 6:07 
GeneralRe: Threads.. Pin
Laing,James15-Jan-04 10:29
Laing,James15-Jan-04 10:29 
GeneralRe: Threads.. Pin
Abhishek Srivastava15-Jan-04 16:58
Abhishek Srivastava15-Jan-04 16:58 
GeneralMSDN installation Pin
Rob Catterall15-Jan-04 3:15
Rob Catterall15-Jan-04 3:15 
GeneralRe: MSDN installation Pin
Maximilien15-Jan-04 3:25
Maximilien15-Jan-04 3:25 
GeneralRe: MSDN installation Pin
Gary Wheeler15-Jan-04 5:14
Gary Wheeler15-Jan-04 5:14 
GeneralRe: MSDN installation Pin
Rob Catterall15-Jan-04 23:15
Rob Catterall15-Jan-04 23:15 
GeneralRe: MSDN installation Pin
Gary Wheeler16-Jan-04 1:57
Gary Wheeler16-Jan-04 1:57 
GeneralOpenGL in an SDI app..! Pin
Halloko15-Jan-04 2:30
Halloko15-Jan-04 2:30 
GeneralRe: OpenGL in an SDI app..! Pin
567890123415-Jan-04 3:00
567890123415-Jan-04 3:00 
GeneralRe: OpenGL in an SDI app..! Pin
Alexander M.,15-Jan-04 5:32
Alexander M.,15-Jan-04 5:32 
GeneralRe: OpenGL in an SDI app..! Pin
Halloko15-Jan-04 5:49
Halloko15-Jan-04 5:49 

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.