Reply to Ary, > Ok. So how can I implement this? It's strange for me that starting two > threads and exiting main ends the application, since there are other > threads alive. > I think there is a "return when this thread does" method on Thread. I think there is also a "Get a list of all threads" call someplace.