You could place all your newly created threads in an array or collection when they are created. You could then Join your UI thread to the first thread. When that thread terminates you would look through the array or collection for the next thread that is still executing and Join to that. You would keep doing this until there were no more threads that were still executing. Make sure you synchronise access to the array or collection though.