How to make a thread wait for another thread to finish execution and then continue?
Suppose I have a main class which does some thing in the Main thread. I start a timer from it. After I start the timer, I want the Main thread to wait for the timer thread to finish and then continue.
I tried to use sleep on the main timer using same time used in timer. But it does not work properly.
Any help is much appreciated.