corrected thread exit protocol