def __init__(self, path, threaded=True):
        """
        >>> lock = MkdirFileLock("somefile")
        >>> lock = MkdirFileLock("somefile", threaded=False)
        """
        LockBase.__init__(self, path, threaded)
        if threaded:
            tname = "%x-" % get_ident()
        else:
            tname = ""
        # Lock file itself is a directory.  Place the unique file name into
        # it.
        self.unique_name = os.path.join(
            self.lock_file,
            "{}.{}{}".format(self.hostname, tname, self.pid)
        )
dataset/ETHPy150Open haystack/eyebrowse-server/notifications/lockfile.py/MkdirFileLock.__init__/original