|
From: Abhijit S. <mu...@gm...> - 2002-06-16 12:08:49
|
> do
> {
> GetExitCodeThread(hThread, &exit_code);
> } while(exit_code == STILL_ACTIVE);
> cout << "\n Thread " << i+1 << " has completed.\n";
I almost fergot... polling GetExitCodeThread() can be very CPU intensive, so
you might want to Sleep() in between polls, as in
do
{
GetExitCodeThread(hThread, &exit_code);
Sleep(DELAY);
} while(exit_code == STILL_ACTIVE);
DELAY can be 100 or more or less, I dunno, depending on the need for speed.
I don't know of any synchornous method to do this.
--------------------------
http://mudeth.tripod.com
|