HEX
Server: Apache
System: Linux scp1.abinfocom.com 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64
User: confeduphaar (1010)
PHP: 8.1.33
Disabled: exec,passthru,shell_exec,system
Upload Files
File: //proc/self/root/usr/lib/python3/dist-packages/twisted/python/__pycache__/threadable.cpython-38.pyc
U


W[��@s�dZddlmZmZddlmZGdd�de�Zdd�Zde_	d	d
�Z
dd�Zd
d�Zdd�Z
ddd�Ze�Zdd�Zdd�Zdd�ZdadadadazddlZWnek
r�dZYn
Xed�ddddgZdS)zT
A module to provide some very basic threading primitives, such as
synchronization.
�)�division�absolute_import��wrapsc@seZdZdZdd�ZdS)�	DummyLockzF
    Hack to allow locks to be unpickled on an unthreaded system.
    cCstdfS�N���
unpickle_lock��selfrr�;/usr/lib/python3/dist-packages/twisted/python/threadable.py�
__reduce__szDummyLock.__reduce__N)�__name__�
__module__�__qualname__�__doc__rrrrr
rsrcCstdk	rt�St�SdS�N)�threadingmodule�XLockrrrrr
r
sr
TcCs>d|jkr0t��d|jkr(t�|jd<t��|j��dS)N�_threadable_lock)�__dict__�_synchLockCreator�acquirer�releaserrrrr
�	_synchPre!s

rcCs|j��dSr)rrrrrr
�
_synchPost+srcst���fdd��}|S)Ncs,t|�z�|f|�|�W�St|�XdSr)rr)r�args�kwargs��functionrr
�sync1sz_sync.<locals>.syncr)�klassr r!rrr
�_sync0sr#cGs>tdk	r:|D],}|jD] }t||j|�}t|||�qqdS)a&
    Make all methods listed in each class' synchronized attribute synchronized.

    The synchronized attribute should be a list of strings, consisting of the
    names of methods that must be synchronized. If we are running in threaded
    mode these methods will be wrapped with a lock.
    N)rZsynchronizedr#r�setattr)Zklassesr"Z
methodNamer!rrr
�synchronize<s

r%�cCsL|r:tsHtdk	r0daGdd�dtjt�at�aqHtd��ntrHtd��ndS)zbInitialize threading.

    Don't bother calling this.  If it needs to happen, it will happen.
    NTc@seZdZdd�ZdS)rcSstdfSrr	rrrr
rYszXLock.__reduce__N)rrrrrrrr
rXsrz:Cannot initialize threading, platform lacks thread supportzCannot uninitialize threads)�threadedrZ_RLock�objectrr�RuntimeError)Zwith_threadsrrr
�initLs

r*cCstdkrtSt��jSr)r�_dummyIDZ
currentThreadZidentrrrr
�getThreadIDhsr,cCs
tt�kS)zHAre we in the thread responsible for I/O requests (the event loop)?
    )�ioThreadr,rrrr
�isInIOThreadosr.cCs
t�adS)z=Mark the current thread as responsible for I/O requests.
    N)r,r-rrrr
�registerAsIOThreadvsr/NFr)r&)rZ
__future__rr�	functoolsrr(rr
Z__safe_for_unpickling__rrr#r%r*r+r,r.r/r-r'rrZ	threadingr�ImportError�__all__rrrr
�<module>s0