don't access thread_specific_ptr after it destructs, clean up _threadStates