관리-도구
편집 파일: lock.cpython-311.pyc
� �܋f� � �� � d Z ddlZddlZddlmZmZ ddlmZ ddlm Z ddl mZmZ ddl mZmZ G d� d e� � Zi Z e� � Z G d � de�� � Z G d � de� � Z G d� de� � Zg d�ZdS )z7holds locking functionality that works across processes� N)�ABCMeta�abstractmethod)�contextmanager)�Path)�Lock�RLock)�FileLock�Timeoutc �6 � � e Zd Z� fd�Zd� fd� Zd� fd� Z� xZS ) �_CountedFileLockc �F �� t j � |� � }t j � |� � s& t j |� � n# t $ r Y nw xY wt � � � |� � d| _ t � � | _ d S �Nr )�os�path�dirname�isdir�makedirs�OSError�super�__init__�countr �thread_safe)�self� lock_file�parent� __class__s ��e/builddir/build/BUILD/cloudlinux-venv-1.0.6/venv/lib/python3.11/site-packages/virtualenv/util/lock.pyr z_CountedFileLock.__init__ s� �� ������+�+���w�}�}�V�$�$� � ���F�#�#�#�#��� � � ��� ���� ������#�#�#��� � �7�7����s �A � A#�"A#N皙�����?c �� �� | j � |�dn|�� � st | j � � �| j dk r"t � � � ||� � | xj dz c_ d S )N���)�timeoutr � )r �acquirer r r r )r r! � poll_intervalr s �r r# z_CountedFileLock.acquire sm �� ���'�'�g�o���7�'�S�S� *��$�.�)�)�)��:��?�?��G�G�O�O�G�]�3�3�3�� � �a�� � � � � Fc �$ �� | j 5 | j dk r| j � � � | j dk r"t � � � |�� � t | j dz d� � | _ d d d � � d S # 1 swxY w Y d S )Nr r"