All threads are closed on exit