def run_select_for_update(self, status, nowait=False):
        status.append('started')
        try:
            # We need to enter transaction management again, as this is done on
            # per-thread basis
            transaction.enter_transaction_management(True)
            transaction.managed(True)
            people = list(
                Person.objects.all().select_for_update(nowait=nowait)
            )
            people[0].name = 'Fred'
            people[0].save()
            transaction.commit()
        except DatabaseError as e:
            status.append(e)
        finally:
            # This method is run in a separate thread. It uses its own
            # database connection. Close it without waiting for the GC.
            connection.close()
Utility method that runs a SELECT FOR UPDATE against all
dataset/ETHPy150Open AppScale/appscale/AppServer/lib/django-1.5/tests/modeltests/select_for_update/tests.py/SelectForUpdateTests.run_select_for_update