wait for threads to start up properly