+
    Dfj                         R t ^ RIHt  ! R R4      tR tR]n        R tR tR tR	 t	RR
 lt
]! 4       tR tR tR tRsRsRsRs ^ RIt]t]
! R4       . ROtR#   ] d    Rt Li ; i)zT
A module to provide some very basic threading primitives, such as
synchronization.
wrapsc                   *   a  ] tR t^t o RtR tRtV tR# )	DummyLockz>
Hack to allow locks to be unpickled on an unthreaded system.
c                    \         R3# N unpickle_lockselfs   &;/usr/lib/python3/dist-packages/twisted/python/threadable.py
__reduce__DummyLock.__reduce__   s    r""    r   N)__name__
__module____qualname____firstlineno____doc__r   __static_attributes____classdictcell____classdict__s   @r   r   r      s     # #r   r   c                  :    \         e   \        4       # \        4       # N)threadingmoduleXLockr   r   r   r   r
   r
      s    "w{r   Tc                     R V P                   9  dQ   \        P                  4        R V P                   9  d   \        4       V P                   R &   \        P	                  4        V P
                  P                  4        R# )_threadable_lockN)__dict___synchLockCreatoracquirer   releaser   r   s   &r   	_synchPrer$   !   sU    .!!#T]]205DMM,-!!#!!#r   c                 :    V P                   P                  4        R # r   )r   r#   r   s   &r   
_synchPostr&   *   s    !!#r   c                 0   a \        S4      V3R  l4       pV# )c                 j   < \        V 4        S! V .VO5/ VB \        V 4       #   \        T 4       i ; ir   )r$   r&   )r   argskwargsfunctions   &*,r   sync_sync.<locals>.sync/   s2    $	D24262tJts   % 2r   )klassr+   r,   s   &f r   _syncr/   .   s     
8_  Kr   c                     \         eG   V  F>  pVP                   F+  p\        WP                  V,          4      p\	        WV4       K-  	  K@  	  R# R# )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   synchronizer5   :   sF     "E#00
UNN:$>?40 1  #r   c                    V '       dI   \         '       g;   \        e(   Rs  ! R R\        P                  4      s\        4       sR# \        R4      hR# \         '       d   \        R4      hR# )zZInitialize threading.

Don't bother calling this.  If it needs to happen, it will happen.
NTc                   &   a  ] tR t^Ut o R tRtV tR# )r   c                    \         R3# r   r	   r   s   &r   r   XLock.__reduce__V   s     -r22r   r   N)r   r   r   r   r   r   r   r   s   @r   r   r   U   s     3 3r   r   z:Cannot initialize threading, platform lacks thread supportzCannot uninitialize threads)threadedr   _RLockr   r!   RuntimeError)with_threadss   &r   initr>   I   s^     x*3O22 3 %*G!"P   8<==r   c                  Z    \         f   \        # \         P                  4       P                  # r   )r   _dummyIDcurrent_threadidentr   r   r   getThreadIDrC   h   s"    ))+111r   c                 $    \         \        4       8H  # )zCAre we in the thread responsible for I/O requests (the event loop)?)ioThreadrC   r   r   r   isInIOThreadrF   n   s    {}$$r   c                     \        4       sR# )z8Mark the current thread as responsible for I/O requests.N)rC   rE   r   r   r   registerAsIOThreadrH   s   s     }Hr   NF)   )rF   rH   rC   r   )r   	functoolsr   r   r
   __safe_for_unpickling__r$   r&   r/   r5   r>   objectr@   rC   rF   rH   rE   r:   r!   r   	threading_threadingmoduler   ImportError__all__r   r   r   <module>rQ      s   
 # # )- %$$	18 82%
  ( 'OJ I  Os   A 	A'&A'