the dumb way is to have a static volatile int. You increment it by one before you start the thread. And in the thread, you decrement it by one at the end. And in your main thread, just brainlessly waiting the int to become 0.

Yupe, quite dumb, but, if you are not doing anything serious, the more dumb the better. Big Smile