https://t.me/RX1948
Server : Apache
System : Linux iad1-shared-b8-43 6.6.49-grsec-jammy+ #10 SMP Thu Sep 12 23:23:08 UTC 2024 x86_64
User : dh_edsupp ( 6597262)
PHP Version : 8.2.26
Disable Function : NONE
Directory :  /lib/python3/dist-packages/lockfile/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //lib/python3/dist-packages/lockfile/__pycache__/linklockfile.cpython-310.pyc
o

��UV\
�@sPddlmZddlZddlZddlmZmZmZmZm	Z	m
Z
Gdd�de�ZdS)�)�absolute_importN�)�LockBase�
LockFailed�	NotLocked�	NotMyLock�LockTimeout�
AlreadyLockedc@s:eZdZdZd
dd�Zdd�Zdd�Zd	d
�Zdd�ZdS)�LinkLockFilez�Lock access to a file using atomic property of link(2).

    >>> lock = LinkLockFile('somefile')
    >>> lock = LinkLockFile('somefile', threaded=False)
    NcCsz
t|jd���Wntytd|j��w|dur|n|j}t��}|dur2|dkr2||7}	zt�|j|j	�WdSt
y�t�|j�j}|dkrSYdS|durut��|krut�
|j�|dkrntd|j��td|j��t�|dur|dp�d	�Ynwq3)
N�wbzfailed to create %srT�z&Timeout waiting to acquire lock for %sz%s is already locked�
g�������?)�open�unique_name�close�IOErrorr�timeout�time�os�link�	lock_file�OSError�stat�st_nlink�unlinkr�pathr	�sleep)�selfr�end_time�nlinks�r �7/usr/lib/python3/dist-packages/lockfile/linklockfile.py�acquires:������zLinkLockFile.acquirecCsN|��std|j��tj�|j�std|j��t�|j�t�|j�dS)Nz%s is not lockedz%s is locked, but not by me)	�	is_lockedrrr�existsrrrr�rr r r!�release7szLinkLockFile.releasecCstj�|j�S�N)rrr$rr%r r r!r#?szLinkLockFile.is_lockedcCs(|��otj�|j�ot�|j�jdkS)Nr)r#rrr$rrrr%r r r!�i_am_lockingBs
��zLinkLockFile.i_am_lockingcCs"tj�|j�rt�|j�dSdSr')rrr$rrr%r r r!�
break_lockGs�zLinkLockFile.break_lockr')	�__name__�
__module__�__qualname__�__doc__r"r&r#r(r)r r r r!r

s
&r
)�
__future__rrr�rrrrrr	r
r r r r!�<module>s
 

https://t.me/RX1948 - 2025