def run_select_for_update(self, status, **kwargs):
status.append('<STR_LIT>')<EOL>try:<EOL><INDENT>with transaction.atomic():<EOL><INDENT>person = Person.objects.select_for_update(**kwargs).get()<EOL>person.name = '<STR_LIT>'<EOL>person.save()<EOL><DEDENT><DEDENT>except (DatabaseError, Person.DoesNotExist) as e:<EOL><INDENT>status.append(e)<EOL><DEDENT>finally:<EOL><INDENT>connection.close()<EOL><DEDENT>
Utility method that runs a SELECT FOR UPDATE against all
Person instances. After the select_for_update, it attempts
to update the name of the only record, save, and commit.

This function expects to run in a separate thread.