That is a very good question, and I don't know why people voted it down. One up from me.
It is not just a matter of waiting forever ( while checkforsomeevent do sleep(10); will do that where checkforsomeevent checks for whatever event you want to terminate on, or TRUE if you don't. Since the thread has nothing to do, sleep(0) seems a waster of resources)
The bigger problem is that Windows will terminate long running console programs that initialize threading support after a while because it thinks they "hang".
I'm not entirely sure this is on (wall) running time, or CPU resources though.
The Free Pascal help compiler chmcmd can run a long time (minutes, because it is compressing html). It supports threading on *nix, but I never got it to work properly under Windows. (and admittedly, since chmcmd is mostly used on *nix, it was not a high priority item)
I back then researched a bit, and it seems you must register a windowhandle and process messages to avoid this. I tried this but failed, and can't find the patch atm, it is probably on my work system.