%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /lib/python3/dist-packages/fasteners/__pycache__/
Upload File :
Create Path :
Current File : //lib/python3/dist-packages/fasteners/__pycache__/process_mechanism.cpython-312.pyc

�

�e���N�ddlmZddlmZddlZddlZGd�de�ZGd�de�ZGd�d	e�ZGd
�de�ZGd�d
e�Z	Gd�de�Z
ejdk(r.ddlZddl
mcmZddlmcmZddlmcmZe	�Ze�ZyddlZe
�Ze�Zy)�)�ABC)�abstractmethodNc�t�eZdZeed���Zeed���Zeed���Zeed���Zy)�&_InterProcessReaderWriterLockMechanismc��y�N�)�lockfile�	exclusives  �=/usr/lib/python3/dist-packages/fasteners/process_mechanism.py�trylockz._InterProcessReaderWriterLockMechanism.trylock	���	�c��yrr	�r
s r�unlockz-_InterProcessReaderWriterLockMechanism.unlockrrc��yrr	��paths r�
get_handlez1_InterProcessReaderWriterLockMechanism.get_handlerrc��yrr	rs r�close_handlez3_InterProcessReaderWriterLockMechanism.close_handlerrN)	�__name__�
__module__�__qualname__�staticmethodrr
rrrr	rrrrsp�������������������������rrc�@�eZdZeed���Zeed���Zy)�_InterProcessMechanismc��yrr	rs rr
z_InterProcessMechanism.trylockrrc��yrr	rs rrz_InterProcessMechanism.unlock$rrN)rrrrrr
rr	rrrrs8�������������rrc�0�eZdZdZed��Zed��Zy)�_WindowsInterProcessMechanismz?Interprocess lock implementation that works on windows systems.c�n�|j�}tj|tjd�y�N�)�fileno�msvcrt�locking�LK_NBLCK�r
r&s  rr
z%_WindowsInterProcessMechanism.trylock-�"�����"�����v�v����2rc�n�|j�}tj|tjd�yr$)r&r'r(�LK_UNLCKr*s  rrz$_WindowsInterProcessMechanism.unlock2r+rN�rrr�__doc__rr
rr	rrr"r"*s+��I��3��3��3��3rr"c�0�eZdZdZed��Zed��Zy)�_FcntlInterProcessMechanismz=Interprocess lock implementation that works on posix systems.c�n�tj|tjtjz�yr)�fcntl�lockf�LOCK_EX�LOCK_NBrs rr
z#_FcntlInterProcessMechanism.trylock;s��
���H�e�m�m�e�m�m�;�<rc�L�tj|tj�yr�r3r4�LOCK_UNrs rrz"_FcntlInterProcessMechanism.unlock?���
���H�e�m�m�,rNr.r	rrr1r18s+��G��=��=��-��-rr1c�P�eZdZdZed��Zed��Zed��Zed��Zy)�-_WindowsInterProcessReaderWriterLockMechanismzRInterprocess readers writer lock implementation that works on windows
    systems.c��|r"tjtjz}ntj}tj|j��}t
j||dddt
jtj���}|ryt
j�}|tjk(ryt|��)Nrr%TF)�win32con�LOCKFILE_FAIL_IMMEDIATELY�LOCKFILE_EXCLUSIVE_LOCKr'�
get_osfhandler&�	win32file�
LockFileEx�pointer�
pywintypes�
OVERLAPPED�GetLastError�ERROR_LOCK_VIOLATION�OSError)r
r�flags�handle�ok�
last_errors      rr
z5_WindowsInterProcessReaderWriterLockMechanism.trylockHs�����6�6��9Y�9Y�Y�E��6�6�E��%�%�h�o�o�&7�8��
�
!�
!�&�%��A�q�)�:K�:K�J�La�La�Lc�:d�
e��
��"�/�/�1�J��Y�;�;�;���j�)�)rc
��tj|j��}tj|dddtj
t
j���}|sttj���y)Nrr%)
r'rAr&rB�UnlockFileExrDrErFrIrG)r
rKrLs   rrz4_WindowsInterProcessReaderWriterLockMechanism.unlock[sa���%�%�h�o�o�&7�8��
�
#�
#�F�A�q�!�Y�5F�5F�z�G\�G\�G^�5_�
`����)�0�0�2�3�3�rc��t|d�S�Nza+��openrs rrz8_WindowsInterProcessReaderWriterLockMechanism.get_handleb����D�$��rc�$�|j�yr��closers rrz:_WindowsInterProcessReaderWriterLockMechanism.close_handlef������rN�	rrrr/rr
rrrr	rrr<r<DsW����*��*�$�4��4�� �� ����rr<c�P�eZdZdZed��Zed��Zed��Zed��Zy)�+_FcntlInterProcessReaderWriterLockMechanismzPInterprocess readers writer lock implementation that works on posix
    systems.c�P�|r"tjtjz}n!tjtjz}	tj||�y#t
tf$r8}|jtjtjfvrYd}~y|�d}~wwxYw)NTF)
r3r5r6�LOCK_SHr4�IOErrorrI�errno�EACCES�EAGAIN)r
rrJ�es    rr
z3_FcntlInterProcessReaderWriterLockMechanism.trylockosw����M�M�E�M�M�1�E��M�M�E�M�M�1�E�	��K�K��%�(�����!�	��w�w�5�<�<����6�6�����		�s�A�B%�-,B �B � B%c�L�tj|tj�yrr8rs rrz2_FcntlInterProcessReaderWriterLockMechanism.unlock�r:rc��t|d�SrQrRrs rrz6_FcntlInterProcessReaderWriterLockMechanism.get_handle�rTrc�$�|j�yrrVrs rrz8_FcntlInterProcessReaderWriterLockMechanism.close_handle�rXrNrYr	rrr[r[ksW������� �-��-�� �� ����rr[�nt)�abcrrr_�osrrr"r1r<r[�namer'�fasteners.pywin32.pywintypes�pywin32rE�fasteners.pywin32.win32conr>�fasteners.pywin32.win32filerB�%_interprocess_reader_writer_mechanism�_interprocess_mechanismr3r	rr�<module>rps������	��S��.	�S�	�3�$:�3�	-�"8�	-�$�4Z�$�N�2X��D�7�7�d�?��5�5�1�1�3�3�,Y�,[�)�;�=���,W�,Y�)�9�;�r

Zerion Mini Shell 1.0