@contextlib.contextmanager
    def gen_lock(self, lock_type='update'):
        lock_set = False
        try:
            self._lock(lock_type=lock_type, failhard=True)
            lock_set = True
            yield
        except (OSError, IOError, GitLockError) as exc:
            raise GitLockError(exc.errno, exc.strerror)
        finally:
            if lock_set:
                self.clear_lock(lock_type=lock_type)
Process received msg/pkt/data.
dataset/ETHPy150Open saltstack/salt/salt/utils/gitfs.py/GitProvider.gen_lock--crossover with--dataset/ETHPy150Open ioflo/ioflo/ioflo/aio/proto/exchanging.py/Exchange.receive