Ensure the thread has actually stopped.