Set the Thread as inactive when terminating it.