potatoCode
March 30th, 2009, 07:14 PM
Hi
I have a question about when thread terminates.
Say I have the following
void foo()
{
Thread(/* all the params */); // e.g. CreateThread()
}
int main()
{
foo();
}
My questions are;
Q1. If I dont explicitly call ExitThread(), when does the process created by Thread() terminates?
Q2. Do all the threads created inside main() end when the program exits
without having called the functions that end the threads?
Thanks alot for the help~
I have a question about when thread terminates.
Say I have the following
void foo()
{
Thread(/* all the params */); // e.g. CreateThread()
}
int main()
{
foo();
}
My questions are;
Q1. If I dont explicitly call ExitThread(), when does the process created by Thread() terminates?
Q2. Do all the threads created inside main() end when the program exits
without having called the functions that end the threads?
Thanks alot for the help~