+
     Bi0                     `   ^ RI t^ RIt^ RIt^ RIt^ RIHt ^ RI	H
t
 ^ RIHt  ^ RIHt . R@Ot]P(                  t]P,                  t]P0                  t]P4                  t]P8                  t]P<                  t]P>                  t]P@                  t ]PB                  t!]PD                  t" ]PF                  t#Rt$]PK                  R4        ]PN                  t(]PR                  t* ]PV                  t,]PZ                  t-A ^ RIH.t/ Rs1Rs2R t3R t4R t5R t6R t7R t8]t9R t+ ! R R4      t:]:t; ! R R4      t< ! R R4      t= ! R R	]=4      t> ! R  R4      t? ! R! R4      t@ ! R" R]A4      tB]! ^4      P                  tDR# tE]+! 4       sF/ tG/ tH]
! 4       tI ! R$ R
4      tJ ^ R%IHKsLHMtN \        tSR+ tT ! R, R]J4      tU ! R- R.]J4      tV]/! 4       tW ! R/ R04      tX ! R1 R2]J4      tYR3 tZR4 t[R5 t\R6 t]R7 t^R8 t_. t`RsaR9 tb^ R:IHctc ]V! 4       sdR; tR< teR= tf]g! ]R>4      '       d   ]P                  ! ]fR?7       R# R#   ] d    ^ RIHt  ELi ; i  ]& d    Rt$ ELi ; i  ]& d    Rt( ELi ; i  ]& d    Rt, ELi ; i  ] d    ^ RI0H/t/  ELi ; i  ] d     ^ R&IOHPtQ ^ R'IHRtR ]R! RR(4      tMR) tNR* sL ELi ; i)A    N)	monotonic)WeakSet)count)deque	ConditionEvent	SemaphoreBoundedSemaphoreThreadBarrierBrokenBarrierErrorTimerExceptHookArgsTget_native_idF)_local)localc                 
    V s R # N_profile_hookfuncs   & /usr/lib/python3.14/threading.py
setprofiler   L   s	     M    c                 H    \        V 4       \        P                  ! V 4       R # r   )r   _sys_setprofileallthreadsr   s   &r   setprofile_all_threadsr   U   s     tt$r   c                      \         # r   r    r   r   
getprofiler"   _   s    r   c                 
    V s R # r   _trace_hookr   s   &r   settracer&   c   s	     Kr   c                 H    \        V 4       \        P                  ! V 4       R # r   )r&   r   _settraceallthreadsr   s   &r   settrace_all_threadsr)   l   s     TNT"r   c                      \         # r   r$   r!   r   r   gettracer+   v   s    r   c                      V '       g	   V'       d   ^ RI pVP                  R\        ^R7       \        f   \	        V / VB # \        V / VB # )r   NzDPassing arguments to RLock is deprecated and will be removed in 3.15
stacklevel)warningswarnDeprecationWarning_CRLock_PyRLock)argskwargsr/   s   *, r   RLockr6   ~   sM     vR 	 	

 (((D#F##r   c                   j   a  ] tR t^t o R tR tR tRR lt]tR t	R t
R tR tR	 tR
 tR tRtV tR# )_RLockc                @    \        4       V n        R V n        ^ V n        R # r   )_allocate_lock_block_owner_countselfs   &r   __init___RLock.__init__   s    $&r   c                B   V P                   p \        V,          P                  pR V P	                  4       '       d   RMRV P
                  P                  V P
                  P                  VV P                  \        \        V 4      4      3,          #   \         d     Lxi ; i)z)<%s %s.%s object owner=%r count=%d at %s>lockedunlocked)r<   _activenameKeyErrorrC   	__class__
__module____qualname__r=   hexid)r?   owners   & r   __repr___RLock.__repr__   s    	EN''E ;H:NN%%NN''KK4M>
 
 	
  		s   B BBc                V    V P                   P                  4        R V n        ^ V n        R # r   )r;   _at_fork_reinitr<   r=   r>   s   &r   rQ   _RLock._at_fork_reinit   s     ##%r   c                    \        4       pV P                  V8X  d   V ;P                  ^,          un        ^# V P                  P	                  W4      pV'       d   W0n        ^V n        V#    )	get_identr<   r=   r;   acquire)r?   blockingtimeoutmercs   &&&  r   rW   _RLock.acquire   sP    4 [;;"KK1K[[  3KDK	r   c                    V P                   \        4       8w  d   \        R 4      hV P                  ^,
          ;V n        pV'       g$   RV n         V P                  P                  4        R# R# )cannot release un-acquired lockN)r<   rV   RuntimeErrorr=   r;   release)r?   r   s   & r   r`   _RLock.release   sQ      ;;)+%@AA"kkAo-eDKKK! r   c                &    V P                  4        R # r   r`   r?   tvtbs   &&&&r   __exit___RLock.__exit__       r   c                6    V P                   P                  4       # r   )r;   rC   r>   s   &r   rC   _RLock.locked   s    {{!!##r   c                X    V P                   P                  4        Vw  V n        V n        R # r   )r;   rW   r=   r<   )r?   states   &&r   _acquire_restore_RLock._acquire_restore   s     #( T[r   c                    V P                   ^ 8X  d   \        R4      hV P                   p^ V n         V P                  pRV n        V P                  P	                  4        W3# )r   r^   N)r=   r_   r<   r;   r`   )r?   r   rM   s   &  r   _release_save_RLock._release_save   sR    ;;!@AA~r   c                0    V P                   \        4       8H  # r   )r<   rV   r>   s   &r   	_is_owned_RLock._is_owned	  s    {{ik))r   c                P    V P                   \        4       8w  d   ^ # V P                  # r   )r<   rV   r=   r>   s   &r   _recursion_count_RLock._recursion_count  s    ;;)+%{{r   )r;   r=   r<   N)T)__name__rI   rJ   __firstlineno__r@   rN   rQ   rW   	__enter__r`   rh   rC   ro   rr   ru   ry   __static_attributes____classdictcell____classdict__s   @r   r8   r8      sI     


"H I".$)*
 r   r8   c                   ~   a  ] tR tRt o RR ltR tR tR tR tR t	R	 t
R
 tRR ltRR ltRR ltR tR tRtV tR# )r   i  Nc                   Vf   \        4       pWn        VP                  V n        VP                  V n        VP                  V n        \        VR4      '       d   VP                  V n        \        VR4      '       d   VP                  V n        \        VR4      '       d   VP                  V n        \        4       V n
        R # )Nrr   ro   ru   )r6   _lockrW   r`   rC   hasattrrr   ro   ru   _deque_waiters)r?   locks   &&r   r@   Condition.__init__"  s    <7D
||||kk 4))!%!3!3D4+,,$($9$9D!4%%!^^DNr   c                n    V P                   P                  4        V P                  P                  4        R # r   )r   rQ   r   clearr>   s   &r   rQ   Condition._at_fork_reinit5  s"    

""$r   c                6    V P                   P                  4       # r   )r   r~   r>   s   &r   r~   Condition.__enter__9  s    zz##%%r   c                6    V P                   P                  ! V!  # r   )r   rh   )r?   r4   s   &*r   rh   Condition.__exit__<  s    zz""D))r   c                R    R V P                   \        V P                  4      3,          # )z<Condition(%s, %d)>)r   lenr   r>   s   &r   rN   Condition.__repr__?  s    $

C4F'GGGr   c                :    V P                   P                  4        R # r   )r   r`   r>   s   &r   rr   Condition._release_saveB      

r   c                :    V P                   P                  4        R # r   )r   rW   )r?   xs   &&r   ro   Condition._acquire_restoreE  r   r   c                    V P                   P                  R 4      '       d   V P                   P                  4        R # R# )FT)r   rW   r`   r>   s   &r   ru   Condition._is_ownedH  s/     ::e$$JJ r   c                   V P                  4       '       g   \        R 4      h\        4       pVP                  4        V P                  P                  V4       V P                  4       pRp Vf   VP                  4        RpM+V^ 8  d   VP                  RV4      pMVP                  R4      pTV P                  V4       V'       g    V P                  P                  V4       # #   \         d     # i ; i  T P                  T4       T'       g/    T P                  P                  T4       i   \         d     i i ; ii ; i)zcannot wait on un-acquired lockFT)
ru   r_   r:   rW   r   appendrr   ro   remove
ValueError)r?   rY   waitersaved_stategotits   &&   r   waitCondition.waitQ  s   . ~~@AA!V$((*	 Q;"NN49E"NN51E!!+.MM((0  " 	 !!+.MM((0!  sC   *AC5 C$$C21C25D>D,+D>,D:7D>9D::D>c                    R pTpV! 4       pV'       gP   Ve2   Vf   \        4       V,           pMV\        4       ,
          pV^ 8:  d    V# V P                  V4       V! 4       pKW  V# r   )_timer   )r?   	predicaterY   endtimewaittimeresults   &&&   r   wait_forCondition.wait_for  sf     #?#g0G&0H1}  IIh[Fr   c                6   V P                  4       '       g   \        R 4      hV P                  pV'       dA   V^ 8  d8   V^ ,          p VP                  4        V^,          p VP	                  V4       KF  R# R#   \         d     L%i ; i  \
         d     Ki  i ; i)z!cannot notify on un-acquired lockN)ru   r_   r   r`   r   r   )r?   nwaitersr   s   &&  r   notifyCondition.notify  s     ~~BCC--!a%QZF	  Qv&  g   
   s$   A8 !B	 8BB	BBc                N    V P                  \        V P                  4      4       R # r   )r   r   r   r>   s   &r   
notify_allCondition.notify_all  s     	C&'r   c                ^    ^ RI pVP                  R\        ^R7       V P                  4        R# )r   Nz3notifyAll() is deprecated, use notify_all() insteadr-   )r/   r0   r1   r   r?   r/   s   & r   	notifyAllCondition.notifyAll  s*     	K(Q 	 	8r   )ro   ru   r   rr   r   rW   rC   r`   r   rT   )r|   rI   rJ   r}   r@   rQ   r~   rh   rN   rr   ro   ru   r   r   r   r   r   r   r   r   s   @r   r   r     sM     !&&*H.`.<(	 	r   c                   N   a  ] tR tRt o R	R ltR tR
R lt]tR	R ltR t	Rt
V tR# )r	   i  c                f    V^ 8  d   \        R4      h\        \        4       4      V n        Wn        R# )r   z$semaphore initial value must be >= 0N)r   r   Lock_cond_value)r?   values   &&r   r@   Semaphore.__init__  s(    19CDDtv&
r   c           	         V P                   pR VP                   RVP                   R\        V 4      R RV P                   R2	# )<. at #x: value=>)rH   rI   rJ   rL   r   r?   clss   & r   rN   Semaphore.__repr__  sK    nnCNN#1S%5%5$6d2d8B- H++a) 	*r   Nc                   V'       g   Ve   \        R4      hRpR pV P                  ;_uu_ 4        V P                  ^ 8X  dZ   V'       g   MkVe0   Vf   \        4       V,           pMV\        4       ,
          pV^ 8:  d   M8V P                  P	                  V4       Kj  V ;P                  ^,          un        RpR R R 4       V#   + '       g   i     T# ; i)Nz.can't specify timeout for non-blocking acquireFT)r   r   r   r   r   )r?   rX   rY   r[   r   s   &&&  r   rW   Semaphore.acquire  s    0 G/MNNZZZ++"&"''G"3")EG"3"a<!

(q   	 Z 	s   C 
A,C  C	c                    V^8  d   \        R4      hV P                  ;_uu_ 4        V ;P                  V,          un        V P                  P                  V4       RRR4       R#   + '       g   i     R# ; i)rU   n must be one or moreN)r   r   r   r   r?   r   s   &&r   r`   Semaphore.release  sL     q5455ZZZKK1KJJa  ZZZs   5A&&A7	c                &    V P                  4        R # r   rc   rd   s   &&&&r   rh   Semaphore.__exit__  rj   r   )r   r   rT   TN)r|   rI   rJ   r}   r@   rN   rW   r~   r`   rh   r   r   r   s   @r   r	   r	     s+     *
+Z I! r   c                   F   a a ] tR tRt oRV 3R lltR tRR ltRtVtV ;t	# )r
   i"  c                2   < \         SV `  V4       Wn        R # r   )superr@   _initial_value)r?   r   rH   s   &&r   r@   BoundedSemaphore.__init__3  s    #r   c                    V P                   pR VP                   RVP                   R\        V 4      R RV P                   RV P
                   R2# )r   r   r   r   r   /r   )rH   rI   rJ   rL   r   r   r   s   & r   rN   BoundedSemaphore.__repr__7  sY    nnCNN#1S%5%5$6d2d8B- H++a(;(;'<A? 	@r   c                N   V^8  d   \        R4      hV P                  ;_uu_ 4        V P                  V,           V P                  8  d   \        R4      hV ;P                  V,          un        V P                  P	                  V4       RRR4       R#   + '       g   i     R# ; i)rU   r   z!Semaphore released too many timesN)r   r   r   r   r   r   s   &&r   r`   BoundedSemaphore.release<  sn     q5455ZZZ{{Q!4!44 !DEEKK1KJJa 	 ZZZs   A"BB$	)r   rT   )
r|   rI   rJ   r}   r@   rN   r`   r   r   __classcell__)rH   r   s   @@r   r
   r
   "  s     "$@
! !r   c                   T   a  ] tR tRt o R tR tR tR tR tR t	R t
RR
 ltRtV tR	# )r   iO  c                D    \        \        4       4      V n        R V n        R# FN)r   r   r   _flagr>   s   &r   r@   Event.__init__Z  s    tv&

r   c           	         V P                   pV P                  '       d   R MRpRVP                   RVP                   R\	        V 4      R RV R2	# )setunsetr   r   r   r   z: r   )rH   r   rI   rJ   rL   )r?   r   statuss   &  r   rN   Event.__repr__^  sN    nn***'3>>"!C$4$4#5T"T(2bPQRRr   c                :    V P                   P                  4        R # r   )r   rQ   r>   s   &r   rQ   Event._at_fork_reinitc  s    

""$r   c                    V P                   # r   )r   r>   s   &r   is_setEvent.is_setg  s    zzr   c                Z    ^ RI pVP                  R\        ^R7       V P                  4       # )r   Nz+isSet() is deprecated, use is_set() insteadr-   )r/   r0   r1   r   r   s   & r   isSetEvent.isSetk  s,     	C(Q 	 	8{{}r   c                    V P                   ;_uu_ 4        R V n        V P                   P                  4        RRR4       R#   + '       g   i     R# ; ir   )r   r   r   r>   s   &r   r   	Event.setv  s0     ZZZDJJJ!!# ZZZs   "AA	c                v    V P                   ;_uu_ 4        R V n        RRR4       R#   + '       g   i     R# ; ir   r   r   r>   s   &r   r   Event.clear  s      ZZZDJ ZZZs   '8	Nc                    V P                   ;_uu_ 4        V P                  pV'       g   V P                   P                  V4      pVuuR R R 4       #   + '       g   i     R # ; ir   )r   r   r   )r?   rY   signaleds   && r   r   
Event.wait  s:     ZZZzzH::??73	 ZZZs   1AA"	r   r   )r|   rI   rJ   r}   r@   rN   rQ   r   r   r   r   r   r   r   r   s   @r   r   r   O  s3     S
%		$ r   c                      a  ] tR tRt o RR ltR tRR ltR tR tR t	R	 t
R
 tR tR t]R 4       t]R 4       t]R 4       tRtV tR# )r   i  Nc                    V^8  d   \        R4      h\        \        4       4      V n        W n        W0n        Wn        ^ V n        ^ V n        R# )rU   zparties must be >= 1N)	r   r   r   r   _action_timeout_parties_stater=   )r?   partiesactionrY   s   &&&&r   r@   Barrier.__init__  sB     Q;344tv&
r   c                   V P                   pV P                  '       d+   R VP                   RVP                   R\	        V 4      R R2# R VP                   RVP                   R\	        V 4      R RV P
                   RV P                   R2# )r   r   r   r   z	: broken>z
: waiters=r   r   )rH   brokenrI   rJ   rL   	n_waitingr   r   s   & r   rN   Barrier.__repr__  s    nn;;;s~~&a(8(8'9bhr])TTCNN#1S%5%5$6d2d8B- H NN+1T\\N!= 	>r   c                   Vf   V P                   pV P                  ;_uu_ 4        V P                  4        V P                  pV ;P                  ^,          un         V^,           V P                  8X  d   V P                  4        MV P                  V4       VV ;P                  ^,          un        V P                  4        uuR R R 4       #   T ;P                  ^,          un        T P                  4        i ; i  + '       g   i     R # ; ir   )r   r   _enterr=   r   _release_wait_exit)r?   rY   indexs   && r   r   Barrier.wait  s     ?mmGZZZKKMKKEKK1K19-MMO JJw'q 

 Z q 

 ZZs#   6C9;C)C9+C66C99D
	c                    V P                   R9   d   V P                  P                  4        K-  V P                   ^ 8  d   \        hR# )rU   Nr{   rU   )r   r   r   r   r>   s   &r   r  Barrier._enter  s2    kkW$JJOO;;?$$ r   c                     V P                   '       d   V P                  4        ^V n        V P                  P                  4        R#    T P	                  4        h ; i)rU   N)r   r   r   r   _breakr>   s   &r   r  Barrier._release  sC    		|||DKJJ!!#	KKMs   A 1A Ac                   a  S P                   P                  V 3R  lV4      '       g   S P                  4        \        hS P                  ^ 8  d   \        hR# )c                  "   < S P                   ^ 8g  # rx   r   r>   s   r   <lambda>Barrier._wait.<locals>.<lambda>  s    DKK1,<r   N)r   r   r  r   r   r?   rY   s   f&r   r	  Barrier._wait  s@    zz""#<gFFKKM$$;;?$$ r   c                    V P                   ^ 8X  d7   V P                  R9   d$   ^ V n        V P                  P                  4        R# R# R# )r   Nr  )r=   r   r   r   r>   s   &r   r
  Barrier._exit  s;    ;;!{{g%

%%' & r   c                0   V P                   ;_uu_ 4        V P                  ^ 8  d3   V P                  ^ 8X  d	   RV n        M V P                  R8X  d   RV n        M^ V n        V P                   P                  4        RRR4       R#   + '       g   i     R# ; i)r   Nr{   )r   r=   r   r   r>   s   &r   resetBarrier.reset  sd     ZZZ{{Q;;!#"$DK[[B& #%DKJJ!!# ZZZs   A%BB	c                    V P                   ;_uu_ 4        V P                  4        R R R 4       R #   + '       g   i     R # ; ir   )r   r  r>   s   &r   abortBarrier.abort+  s"     ZZZKKM ZZZs	   0A	c                H    RV n         V P                  P                  4        R# )   Nr  )r   r   r   r>   s   &r   r  Barrier._break5  s     

r   c                    V P                   # r   )r   r>   s   &r   r   Barrier.parties;  s     }}r   c                @    V P                   ^ 8X  d   V P                  # ^ # rx   )r   r=   r>   s   &r   r  Barrier.n_waiting@  s    
 ;;!;;r   c                     V P                   R8H  # )r$  r  r  r>   s   &r   r  Barrier.brokenI  s     {{b  r   )r   r   r=   r   r   r   NNr   )r|   rI   rJ   r}   r@   rN   r   r  r  r	  r
  r  r!  r  propertyr   r  r  r   r   r   s   @r   r   r     ss     $>< 
 ($(      ! !r   c                       ] tR tRtRtR# )r   iO  r!   N)r|   rI   rJ   r}   r   r!   r   r   r   r   O  s    r   c                 $    V \        4       ,          # r   )_counter)name_templates   &r   _newnamer2  U  s    8:%%r   c                   J  a  ] tR tRt o RtRRRRR/R lltRR ltR tR	 tR
 t	R t
R t]'       d   R tR tR tR tRR lt]R 4       t]P(                  R 4       t]R 4       t]'       d	   ]R 4       tR t]R 4       t]P(                  R 4       tR tR tR tR tRtV tR# ) r   id  FNdaemoncontextc               h   Vf   / pV'       d   \        V4      pM)\        R4      pVe    VP                  pVRV R2,          pW n        W0n        W@n        WPn        Ve+   V'       d   \        4       '       g   \        R4      hW`n
        M\        4       P                  V n
        Wpn        R V n        \        '       d   R V n        \#        4       V n        \'        4       V n        RV n        \,        P.                  V n        \3        4       V n        \6        P9                  V 4       R #   \         d     Li ; i)Nz	Thread-%dz ()z4daemon threads are disabled in this (sub)interpreterT)strr2  r|   AttributeError_target_name_args_kwargs_daemon_threads_allowedr_   	_daemoniccurrent_threadr4  _context_ident_HAVE_THREAD_NATIVE_ID
_native_id_ThreadHandle_os_thread_handler   _started_initializedr   stderr_stderr_make_invoke_excepthook_invoke_excepthook	_danglingadd)	r?   grouptargetrF   r4   r5   r4  r5  target_names	   &&&&&&$$ r   r@   Thread.__init__o  s    @ >Ft9DK(D!"(//KbQ//D 

577"#YZZ#N+-44DN!!"DO!. {{"9";d1 & s   D# #D10D1c                    V P                   P                  4        Ve'   Wn        \        '       d   V P	                  4        R # R # R # r   )rG  rQ   rB  rC  _set_native_idr?   	new_idents   &&r   _after_forkThread._after_fork  s9    %%' #K%%##% &
 r   c                n   R pV P                   P                  4       '       d   RpV P                  P                  4       '       d   RpV P                  '       d
   VR,          pV P
                  e   VRV P
                  ,          ,          pRV P                  P                  : RV P                  : RV: R2# )	initialstartedstoppedz daemonz %sr   (z, z)>)	rG  r   rF  is_doner?  rB  rH   r|   r;  )r?   r   s   & r   rN   Thread.__repr__  s    ==!!F!!))++F>>>iF;;"edkk))F!%!8!8$**fMMr   c                   V P                   '       g   \        R 4      hV P                  P                  4       '       d   \        R4      h\        ;_uu_ 4        V \
        V &   RRR4       V P                  fV   \        P                  P                  '       d   \        P                  ! 4       V n        M\        P                  ! 4       V n         \        V P                  V P                  V P                   R7       T P                  P%                  4        R#   + '       g   i     L; i  \"         d4    \        ;_uu_ 4        \
        T  RRR4       h   + '       g   i     h ; ii ; i)zthread.__init__() not calledz threads can only be started onceN)handler4  )rH  r_   rG  r   _active_limbo_lock_limborA  r   flagsthread_inherit_context_contextvarscopy_contextContext_start_joinable_thread
_bootstraprF  r4  	Exceptionr   r>   s   &r   startThread.start  s        =>>==!!ABBF4L   == zz000 , 9 9 ; !- 4 4 6	"4??4;Q;Q*.++7 	)     	##4L $ $#	s0   
D,D( D%	(E&E		E&E"	E&c                     V P                   e'   V P                   ! V P                  / V P                  B  V = V =V =R #   T = T =T =i ; ir   )r:  r<  r=  r>   s   &r   run
Thread.run  sG    	7||'djj9DLL9 dj$,dj$,s	   4> Ac                n     V P                  4        R #    T P                  '       d   \        f    R # h ; ir   )_bootstrap_innerr?  r   r>   s   &r   rj  Thread._bootstrap  s-    	!!#	~~~$,s    44c                $    \        4       V n        R # r   )rV   rB  r>   s   &r   
_set_identThread._set_ident  s    kr   c                $    \        4       V n        R # r   )r   rD  r>   s   &r   rT  Thread._set_native_id  s    +oDOr   c                    \         e   V P                  '       g   R #  \        V P                  4       R #   \         d     R # i ; ir   )	_set_namer;  OSErrorr>   s   &r   _set_os_nameThread._set_os_name   s6    DJJJ	djj! 		s   5 AAc                    V P                  4        \        '       d   V P                  4        V P                  4        V P                  P                  4        \        ;_uu_ 4        V \        V P                  &   \        V  R R R 4       \        '       d   \        P                  ! \        4       \        '       d   \        P                  ! \        4        V P                  P!                  V P                   4       T P%                  4        R #   + '       g   i     L; i   T P#                  T 4        L:; i  T P%                  4        i ; ir   )ru  rC  rT  r|  rG  r   rb  rE   rB  rc  r%   r   r&   r   r   rA  ro  rL  _deleter>   s   &r   rr  Thread._bootstrap_inner(  s    	OO%%##%MM##'+$4L $ {k*}..!!$((+ LLN $#.''-LLNsG   D8 AD8 &DD8 %D8 ;D8 %D  D	D8  D53D8 8E
c                z    \         ;_uu_ 4        \        \        4        R R R 4       R #   + '       g   i     R # ; ir   )rb  rE   rV   r>   s   &r   r  Thread._delete?  s!    	$  s   ):	c                   V P                   '       g   \        R 4      hV P                  P                  4       '       g   \        R4      hV \	        4       J d   \        R4      hVe   \        V^ 4      pV P                  P                  V4       R# )Thread.__init__() not calledz'cannot join thread before it is startedzcannot join current threadN)rH  r_   rG  r   r@  maxrF  joinr  s   &&r   r  Thread.joinH  sy    0    =>>}}##%%HII>##;<< '1oG##G,r   c                    V P                   # r   )r;  r>   s   &r   rF   Thread.namen  s     zzr   c                |    \        V4      V n        \        4       V P                  8X  d   V P	                  4        R # R # r   )r8  r;  rV   rB  r|  )r?   rF   s   &&r   rF   r  y  s.     Y
;$++% &r   c                    V P                   # r   )rB  r>   s   &r   identThread.ident  s     {{r   c                    V P                   # r   )rD  r>   s   &r   	native_idThread.native_id  s     ??"r   c                    V P                   P                  4       ;'       d     V P                  P                  4       '       * # r   )rG  r   rF  r^  r>   s   &r   is_aliveThread.is_alive  s1     }}##%NNd.D.D.L.L.N*NNr   c                    V P                   # r   )r?  r>   s   &r   r4  Thread.daemon  s     ~~r   c                    V P                   '       g   \        R 4      hV'       d   \        4       '       g   \        R4      hV P                  P	                  4       '       d   \        R4      hWn        R# )r  z/daemon threads are disabled in this interpreterz)cannot set daemon status of active threadN)rH  r_   r>  rG  r   r?  )r?   daemonics   &&r   r4  r    sV       =>>355PQQ==!!JKK!r   c                R    ^ RI pVP                  R\        ^R7       V P                  # )r   Nz:isDaemon() is deprecated, get the daemon attribute insteadr-   r/   r0   r1   r4  r   s   & r   isDaemonThread.isDaemon  s*     	R(Q 	 	8{{r   c                J    ^ RI pVP                  R\        ^R7       Wn        R# )r   Nz;setDaemon() is deprecated, set the daemon attribute insteadr-   r  )r?   r  r/   s   && r   	setDaemonThread.setDaemon  s%     	S(Q 	 	8r   c                R    ^ RI pVP                  R\        ^R7       V P                  # )r   Nz7getName() is deprecated, get the name attribute insteadr-   r/   r0   r1   rF   r   s   & r   getNameThread.getName  s*     	O(Q 	 	8yyr   c                J    ^ RI pVP                  R\        ^R7       Wn        R# )r   Nz7setName() is deprecated, set the name attribute insteadr-   r  )r?   rF   r/   s   && r   setNameThread.setName  s%     	O(Q 	 	8	r   )r<  rA  r?  rB  rH  rL  r=  r;  rD  rF  rG  rJ  r:  r4  rF   )NNNr!   Nr   )r|   rI   rJ   r}   rH  r@   rW  rN   rl  ro  rj  ru  rC  rT  r|  rr  r  r  r-  rF   setterr  r  r  r4  r  r  r  r  r   r   r   s   @r   r   r   d  s     LB15B?CBHN$L7"(" 	..%$-L   
[[    	 	 		# 
	#	O   ]]" "				 	r   )_excepthook_ExceptHookArgs)print_exception)
namedtuplez'exc_type exc_value exc_traceback threadc                     \        V !  # r   )r  )r4   s   &r   r   r     s    %%r   c                   V P                   \        8X  d   R # \        e$   \        P                  e   \        P                  pM-V P                  e   V P                  P
                  pVf   R # MR # V P                  e   V P                  P                  pM
\        4       p\        RV R2VRR7       \        V P                   V P                  V P                  VR7       VP                  4        R # )NzException in thread :Tfileflush)r  )exc_type
SystemExitr   rI  threadrJ  rF   rV   print_print_exception	exc_valueexc_tracebackr  )r4   rI  rF   s   "  r   
excepthookr    s     ==J& 7[[F[[$[[((F~   ;;";;##D;D$TF!,	'8J8J$	&r   c                     aaaaa \         o\        P                   oSf   \        R4      hSf   \        R4      h\        P                  o\        o\        oVVVVV3R lp V # )Nzthreading.excepthook is Nonezsys.excepthook is Nonec                 p  <  \         pVf   Sp\        . S
! 4       OV N4      pV! V4       R pR #   \         du   pRTn        ?Se   SP                  e   SP                  pMT P
                  pS! RTRR7       Se   SP                   e   SP                   pMS	pT! S
! 4       !    R p?L~R p?ii ; i  R pi ; i)NTz"Exception in threading.excepthook:r  )r  r   rk  __suppress_context__rI  rJ  )r  hookr4   excrI  sys_excepthooklocal_print	local_sysold_excepthookold_sys_excepthooksys_exc_infos   &     r   invoke_excepthook2_make_invoke_excepthook.<locals>.invoke_excepthook+  s    	D|%!";LN";F";<DJ* D)  	,'+C$$)9)9)E"))<#41 $)=)=)I!*!5!5!3LN+#	,( Ds'   (/ B.A*B)$B1 )B..B1 1B5)r  r   r_   exc_infor  )r  r  r  r  r  r  s    @@@@@r   rK  rK    s^    
  N9::!344==LKI @ r   c                   6   a  ] tR tRt o RR ltR tR tRtV tR# )r   iP  Nc                    \         P                  V 4       Wn        W n        Ve   TM. V n        Ve   TM/ V n        \        4       V n        R # r   )r   r@   intervalfunctionr4   r5   r   finished)r?   r  r  r4   r5   s   &&&&&r   r@   Timer.__init__Y  s=       ,D"	 & 2fr   c                :    V P                   P                  4        R # r   )r  r   r>   s   &r   cancelTimer.cancela  s    r   c                   V P                   P                  V P                  4       V P                   P                  4       '       g'   V P                  ! V P
                  / V P                  B  V P                   P                  4        R # r   )r  r   r  r   r  r4   r5   r   r>   s   &r   ro  	Timer.rune  sT    4==)}}##%%MM49944r   )r4   r  r  r  r5   r,  )	r|   rI   rJ   r}   r@   r  ro  r   r   r   s   @r   r   r   P  s       r   c                   &   a  ] tR tRt o R tRtV tR# )_MainThreadin  c                p   \         P                  V R RR7       V P                  P                  4        \	        4       V n        \        V P
                  4      V n        \        '       d   V P                  4        \        ;_uu_ 4        V \        V P
                  &   RRR4       R#   + '       g   i     R# ; i)
MainThreadFrF   r4  N)r   r@   rG  r   _get_main_thread_identrB  _make_thread_handlerF  rC  rT  rb  rE   r>   s   &r   r@   _MainThread.__init__p  st    <>,.!4T[[!A!!!#'GDKK   s   B$$B5	)rB  rF  N)r|   rI   rJ   r}   r@   r   r   r   s   @r   r  r  n  s     ( (r   r  c                   4   a  ] tR tRt o R t]]3R ltRtV t	R# )_DeleteDummyThreadOnDeli  c                J    Wn         VP                  V n        V \        n        R # r   )_dummy_threadr  _tident_thread_local_info_track_dummy_thread_ref)r?   dummy_threads   &&r   r@    _DeleteDummyThreadOnDel.__init__  s     )#)) 6:2r   c                    T;_uu_ 4        VP                  V P                  4      V P                  J d   VP                  V P                  R 4       R R R 4       R #   + '       g   i     R # ; ir   )getr  r  pop)r?   rb  rE   s   &&&r   __del___DeleteDummyThreadOnDel.__del__  sD    {{4<<(D,>,>>DLL$/  s   AAA,	)r  r  N)
r|   rI   rJ   r}   r@   rb  rE   r  r   r   r   s   @r   r  r    s     
	: *<W 0 0r   r  c                   @   a  ] tR tRt o R tR tRR ltRR ltRtV t	R# )	_DummyThreadi  c                   \         P                  V \        R 4      \        4       R7       V P                  P                  4        V P                  4        \        V P                  4      V n	        \        '       d   V P                  4        \        ;_uu_ 4        V \        V P                  &   RRR4       \        V 4       R#   + '       g   i     L; i)zDummy-%dr  N)r   r@   r2  r>  rG  r   ru  r  rB  rF  rC  rT  rb  rE   r  r>   s   &r   r@   _DummyThread.__init__  s    8J#768 	 	:!4T[[!A!!!#'GDKK   %  s   CC	c                    V P                   P                  4       '       g#   V P                  P                  4       '       d   R # \	        R4      h)Tzthread is not alive)rF  r^  rG  r   r_   r>   s   &r   r  _DummyThread.is_alive  s8    %%--//DMM4H4H4J4J011r   Nc                    \        R 4      h)zcannot join a dummy thread)r_   r  s   &&r   r  _DummyThread.join  s    788r   c                l    Ve   \         V n        RV n        RV n        \        P                  WR7       R # )Nr  FrV  )r  rH   r;  r?  r   rW  rU  s   &&r   rW  _DummyThread._after_fork  s.     (DN%DJ"DN45r   )rH   r?  r;  rF  r   )
r|   rI   rJ   r}   r@   r  r  rW  r   r   r   s   @r   r  r    s     
&2
96 6r   r  c                  d     \         \        4       ,          #   \         d    \        4       u # i ; ir   )rE   rV   rG   r  r!   r   r   r@  r@    s+    y{## ~s    //c                  N    ^ RI p V P                  R\        ^R7       \        4       # )r   Nz;currentThread() is deprecated, use current_thread() insteadr-   )r/   r0   r1   r@  r/   s    r   currentThreadr    s)     MMO$  4r   c                      \         ;_uu_ 4        \        \        4      \        \        4      ,           uuR R R 4       #   + '       g   i     R # ; ir   )rb  r   rE   rc  r!   r   r   active_countr    s)     
	7|c&k) 
			s	   #=A	c                  N    ^ RI p V P                  R\        ^R7       \        4       # )r   Nz7activeCount() is deprecated, use active_count() insteadr-   )r/   r0   r1   r  r  s    r   activeCountr    s(     MMK$  4>r   c                      \        \        P                  4       4      \        \        P                  4       4      ,           # r   )listrE   valuesrc  r!   r   r   
_enumerater    s$     !D$999r   c                      \         ;_uu_ 4        \        \        P                  4       4      \        \        P                  4       4      ,           uuR R R 4       #   + '       g   i     R # ; ir   )rb  r  rE   r  rc  r!   r   r   	enumerater     s8     
	GNN$%V]]_(== 
			s   ?AA*	c                 p   a aa \         '       d   \        R 4      h\        P                  VV V3R l4       R# )z$can't register atexit after shutdownc                     < S! S / SB # r   r!   )argr   r5   s   r   r  "_register_atexit.<locals>.<lambda>  s    dC&:6&:r   N)_SHUTTING_DOWNr_   _threading_atexitsr   )r   r  r5   s   fjlr   _register_atexitr    s%     ~ABB:;r   )
stack_sizec                      \         P                  P                  4       '       d   \        4       '       d   R # Rs\        \        4       F
  p V ! 4        K  	  \        4       '       d   \         P                  P                  4        \        4        R # )NT)	_main_threadrF  r^  _is_main_interpreterr  reversedr  	_set_done_thread_shutdown)atexit_calls    r   	_shutdownr    sh     %%--//4H4J4J N   23 4 &&002 r   c                      \         # r   )r
  r!   r   r   main_threadr  1  s
     r   c                  $   \        4       s/ p  \        \        4       ,          pVs\        ;_uu_ 4        \        \        4       4      pVP                  \        4       V F:  pW1J d#   \        4       pVP                  VR 7       W0V&   K*  VP                  4        K<  	  \        P                  4        \        P                  4        \        P                  V 4       RRR4       R#   \         d    \        4       p Li ; i  + '       g   i     R# ; i)r  N)r6   rb  rE   rV   rG   r  r
  r   r  updaterM  rW  rc  r   )
new_activecurrentthreadsr  r  s        r   rW  rW  ;  s      J )+& L		 jl#y!F  !""U"3$*5! ""$  	z"' 
	    -	  
		s   C# B&C>#C;:C;>D	register_at_fork)after_in_child)rV   r  r   r@  r   r  TIMEOUT_MAXr   r   r6   r	   r
   r   r   r   r   ThreadErrorr   r&   r   r  r  r   r+   r"   r   r)   )ios_ossysr   _threadrf  timer   r   _weakrefsetr   	itertoolsr   r=   _collectionsr   r   ImportErrorcollections__all__start_joinable_threadri  daemon_threads_allowedr>  allocate_lockr:   LockType	_LockTyper  r  r  rE  rV   r  r  r   rC  r   r9  set_namerz  errorr  r6   r2   r  r   r   _threading_localr   r%   r   r   r"   r&   r)   r+   r   r8   r3   r   r	   r
   r   r   r_   r   __next__r0  r2  rb  rE   rc  rM  r   r  r  r  r   	tracebackr  r  r  __excepthook__rK  r   r  r  r  r  r@  r  r  r  r  r   r  r  r  r  r
  r  rW  r   r  r!   r   r   <module>r2     s;       #  %,,< !66 !88 &&	$$ 11 %%	 77 33 #))M!NN?#  I mmmmG !!
'' %# $( B r rjT Tn*!y *!ZO Oz`! `!F	 	
 !9& W 
	I	
B BJ+<\ 0jF <
(& 
( W 0 0:66 6@
	
*	:	>  <   }6*!Z 3"##4 $w2  ,++,H  #"#  I
  G  '&&'P%  (=& 13O&(sk   H/ 'I I  I# :I3 J /I ?I 	II	I I #	I0/I03JJ"J-,J-