@classmethod<EOL><INDENT>def lock_until_commit(cls, name):<DEDENT>
Lock.objects.select_for_update().get(name=name)<EOL>
Grabs this lock and holds it (using ``select_for_update()``) until
        the next commit is done.

        :param name:
            Name for a previously created ``Lock`` object