Ë
    ojÿ  ã                   óÌ   — d Z ddlmZ  G d„ d«      Zd„ Zde_        d„ Zd„ Zd	„ Zd
„ Z	dd„Z
 e«       Zd„ Zd„ Zd„ Zdadadada	 ddlZeZ e
d«       g d¢Zy# e$ r dZY Œw xY w)zT
A module to provide some very basic threading primitives, such as
synchronization.
é    ©Úwrapsc                   ó   — e Zd ZdZd„ Zy)Ú	DummyLockzF
    Hack to allow locks to be unpickled on an unthreaded system.
    c                 ó   — t         dfS ©N© ©Úunpickle_lock©Úselfs    ú;/usr/lib/python3/dist-packages/twisted/python/threadable.pyÚ
__reduce__zDummyLock.__reduce__   s   € Ü˜rÐ"Ð"ó    N)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r	   r   r   r   r      s   „ ñó#r   r   c                  ó6   — t         �
t        «       S t        «       S ©N)ÚthreadingmoduleÚXLockr   r	   r   r   r   r      s   € ÜÐ"Ü‹wˆä‹{Ðr   Tc                 óî   — d| j                   vrMt        j                  «        d| j                   vrt        «       | j                   d<   t        j	                  «        | j
                  j                  «        y )NÚ_threadable_lock)Ú__dict__Ú_synchLockCreatorÚacquirer   Úreleaser   r   s    r   Ú	_synchPrer   !   sU   € Ø §¡Ñ.Ü×!Ñ!Ô#Ø T§]¡]Ñ2Ü05³ˆD�M‰MÐ,Ñ-Ü×!Ñ!Ô#Ø×Ñ×!Ñ!Õ#r   c                 ó8   — | j                   j                  «        y r   )r   r   r   s    r   Ú
_synchPostr!   *   s   € Ø×Ñ×!Ñ!Õ#r   c                 ó.   ‡— t        ‰«      ˆfd„«       }|S )Nc                 ój   •— t        | «       	  ‰| g|¢­i |¤Žt        | «       S # t        | «       w xY wr   )r   r!   )r   ÚargsÚkwargsÚfunctions      €r   Úsyncz_sync.<locals>.sync/   s2   ø€ ä�$Œð	Ù˜DÐ2 4Ò2¨6Ñ2ä�tÕøŒJ�tÕús   Ž% ¥2r   )Úklassr&   r'   s    ` r   Ú_syncr)   .   s    ø€ Ü
ˆ8ƒ_óó ðð €Kr   c                  óŽ   — t         �?| D ]9  }|j                  D ](  }t        ||j                  |   «      }t	        |||«       Œ* Œ; yy)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)r   Úsynchronizedr)   r   Úsetattr)Úklassesr(   Ú
methodNamer'   s       r   Úsynchronizer/   :   sT   € ô Ð"Øò 	1ˆEØ#×0Ñ0ò 1�
Ü˜U E§N¡N°:Ñ$>Ó?�Ü˜˜z¨4Õ0ñ1ñ	1ð #r   c                 ó¦   — | r>t         s7t        �&da  G d„ dt        j                  «      at        «       ayt        d«      ‚yt         rt        d«      ‚y)zbInitialize threading.

    Don't bother calling this.  If it needs to happen, it will happen.
    NTc                   ó   — e Zd Zd„ Zy)r   c                 ó   — t         dfS r   r
   r   s    r   r   zXLock.__reduce__V   s   € Ü -¨rÐ2Ð2r   N)r   r   r   r   r	   r   r   r   r   U   s   „ ó3r   r   z:Cannot initialize threading, platform lacks thread supportzCannot uninitialize threads)Úthreadedr   Ú_RLockr   r   ÚRuntimeError)Úwith_threadss    r   Úinitr7   I   sZ   € ñ ÝÜÐ*Ø�ô3œO×2Ñ2ô 3ô %*£GÑ!ä"ØPóð ð õ ÜÐ<Ó=Ð=àr   c                  óV   — t         €t        S t         j                  «       j                  S r   )r   Ú_dummyIDÚcurrent_threadÚidentr	   r   r   ÚgetThreadIDr<   h   s"   € ÜÐÜˆÜ×)Ñ)Ó+×1Ñ1Ð1r   c                  ó$   — t         t        «       k(  S )zCAre we in the thread responsible for I/O requests (the event loop)?)ÚioThreadr<   r	   r   r   ÚisInIOThreadr?   n   s   € ä”{“}Ñ$Ð$r   c                  ó   — t        «       ay)z8Mark the current thread as responsible for I/O requests.N)r<   r>   r	   r   r   ÚregisterAsIOThreadrA   s   s   € ô ‹}�Hr   NF)r?   rA   r<   r   )é   )r   Ú	functoolsr   r   r   Ú__safe_for_unpickling__r   r!   r)   r/   r7   Úobjectr9   r<   r?   rA   r>   r3   r   r   Ú	threadingÚ_threadingmoduler   ÚImportErrorÚ__all__r	   r   r   ú<module>rJ      s¤   ðñ
õ ÷#ñ #òð )-€Ô %ò$ò$ò	ò1óñ8 ‹8€ò2ò%ò
ð €Ø€àÐ Ø€ðÛ(ð '€OÙˆ„Jò I�øð ò Ø‚Oðús   ÁA ÁA#Á"A#