Wait for threads to finish once complete.