How do you determine if a thread is running?
Have your thread notify some other thread when it’s finished. This way you’ll always know exactly what’s going on.