ok

Mini Shell

Direktori : /opt/alt/python37/lib/python3.7/site-packages/clcommon/__pycache__/
Upload File :
Current File : //opt/alt/python37/lib/python3.7/site-packages/clcommon/__pycache__/lock.cpython-37.pyc

B

E!wd��@sFddlmZddlZddlZddlZdd�Zdd�Zejdd��ZdS)	�)�absolute_importNcCs|tj�|�}|dkr2tj�|�s2t�tj�|��t|d�}t�|tj�|�	dd�|�
�|�tt�
���|��|S)N�za+r)�os�path�dirname�exists�makedirs�open�fcntl�flockZLOCK_EX�seek�truncate�write�str�getpid�flush)�
lockfile_pathZ
lock_file_dir�fd�r�>/opt/alt/python37/lib/python3.7/site-packages/clcommon/lock.py�
setup_locks
rcCst�|��tj�|��dS)N)r
r�filenoZLOCK_UN�close)rrrr�release_lock srccst|�}dVt|�dS)zE
    Usage:
    with acquire_lock():
       ... do something ...
    N)rr)rrrrr�acquire_lock%sr)	Z
__future__r�
contextlibr
rrr�contextmanagerrrrrr�<module>s

Zerion Mini Shell 1.0