int
Waits for all the threads to complete and then kills the threading system and exits the application.
You can call it only from the main thread.