I got a doubt while implementing threads, so thought of getting it cleared before i do some progress. I have a method from where the new thread is getting called and in the next line i have return statement.
Method(){
Calling thread ();
return statement;
}
What happens here? I mean Does the parent process completes before the child process?
Kindly look at this post
make-parent-thread-wait-till-child-thread-completes-or-timeout
You need to use
joinmethod.You have to wait for the child thread to complete before parent completes.