somu0915
May 28th, 2008, 03:16 AM
Hi I am creating two threads in my main method.
One: UI Thread which runs the UIMethod.
Second: Background Thread which runs the BackGroundMethod.
Now in the BackGroundMethod, I am calling several other methods which create many many threads and do lot of background work.
How can I know in the Main Method, when all of the entire threads created have terminated?
If I use Join method, then it would wait only for the BackgroundMethod to finish and not all the threads in the BackGroundMethod.
Can anyone help me on this??
One: UI Thread which runs the UIMethod.
Second: Background Thread which runs the BackGroundMethod.
Now in the BackGroundMethod, I am calling several other methods which create many many threads and do lot of background work.
How can I know in the Main Method, when all of the entire threads created have terminated?
If I use Join method, then it would wait only for the BackgroundMethod to finish and not all the threads in the BackGroundMethod.
Can anyone help me on this??