When the active thread becomes another, update its ID