For the sake of tests, can this actually wait for the thread to finish?