def _lock_wait_unlock(self, event1, event2):
        l = lockfile.LockFile(self._testfile())
        l.acquire()
        try:
            event1.set()   # we're in,
            event2.wait()  # wait for boss's permission to leave
        finally:
            l.release()
Lock from another thread.  Helper for tests.
dataset/ETHPy150Open openstack/pylockfile/test/compliancetest.py/ComplianceTest._lock_wait_unlock