+
     Bi^              
          R t ^ RIt^ RIt^ RIt^ RIt^ RIt^ RIt^ RIHt Rt	Rt
RtRtRtRtR	tR
tRt]R]R]R]R]R/t]P&                  ! R4      t ! R R]4      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 ]4      tR! t R" t!R.R# lt"]PF                  ! R$R%4      t$R]3R& lt%R.R' lt& ! R( R)]4      t' ! R* R+]4      t( ! R, R-])4      t*R# )/z"Brian Quinlan (brian@sweetapp.com)N)isliceFIRST_COMPLETEDFIRST_EXCEPTIONALL_COMPLETED_AS_COMPLETEDPENDINGRUNNING	CANCELLEDCANCELLED_AND_NOTIFIEDFINISHEDpendingrunning	cancelledfinishedzconcurrent.futuresc                       ] tR t^'tRtR# )Error N__name__
__module____qualname____firstlineno____static_attributes__r       //usr/lib/python3.14/concurrent/futures/_base.pyr   r   '       r   r   c                       ] tR t^+tRtR# )CancelledErrorr   Nr   r   r   r   r   r   +   r   r   r   c                       ] tR t^1tRtR# )InvalidStateErrorr   Nr   r   r   r   r   r   1   r   r   r   c                   8   a  ] tR t^5t o R tR tR tR tRtV t	R# )_Waiterc                H    \         P                  ! 4       V n        . V n        R # N)	threadingEventeventfinished_futuresselfs   &r   __init___Waiter.__init__7   s    __&
 "r   c                <    V P                   P                  V4       R # r#   r'   appendr)   futures   &&r   
add_result_Waiter.add_result;       $$V,r   c                <    V P                   P                  V4       R # r#   r-   r/   s   &&r   add_exception_Waiter.add_exception>   r3   r   c                <    V P                   P                  V4       R # r#   r-   r/   s   &&r   add_cancelled_Waiter.add_cancelledA   r3   r   )r&   r'   N)
r   r   r   r   r*   r1   r5   r8   r   __classdictcell____classdict__s   @r   r!   r!   5   s     #--- -r   r!   c                   V   a a ] tR t^Dt oV 3R ltV 3R ltV 3R ltV 3R ltRtVt	V ;t
# )_AsCompletedWaiterc                `   < \         \        V `  4        \        P                  ! 4       V n        R # r#   )superr>   r*   r$   Locklock)r)   	__class__s   &r   r*   _AsCompletedWaiter.__init__G   s     $02NN$	r   c                   < V P                   ;_uu_ 4        \        \        V `  V4       V P                  P                  4        R R R 4       R #   + '       g   i     R # ; ir#   )rB   r@   r>   r1   r&   setr)   r0   rC   s   &&r   r1   _AsCompletedWaiter.add_resultK   s6    YYY$d6v>JJNN YYY   .AA	c                   < V P                   ;_uu_ 4        \        \        V `  V4       V P                  P                  4        R R R 4       R #   + '       g   i     R # ; ir#   )rB   r@   r>   r5   r&   rF   rG   s   &&r   r5    _AsCompletedWaiter.add_exceptionP   6    YYY$d9&AJJNN YYYrI   c                   < V P                   ;_uu_ 4        \        \        V `  V4       V P                  P                  4        R R R 4       R #   + '       g   i     R # ; ir#   )rB   r@   r>   r8   r&   rF   rG   s   &&r   r8    _AsCompletedWaiter.add_cancelledU   rL   rI   )rB   )r   r   r   r   r*   r1   r5   r8   r   r:   __classcell__rC   r<   s   @@r   r>   r>   D   s     %

 r   r>   c                   J   a a ] tR t^Zt oV 3R ltV 3R ltV 3R ltRtVtV ;t	# )_FirstCompletedWaiterc                Z   < \         SV `  V4       V P                  P                  4        R # r#   )r@   r1   r&   rF   rG   s   &&r   r1    _FirstCompletedWaiter.add_result]   s    6"

r   c                Z   < \         SV `  V4       V P                  P                  4        R # r#   )r@   r5   r&   rF   rG   s   &&r   r5   #_FirstCompletedWaiter.add_exceptiona       f%

r   c                Z   < \         SV `  V4       V P                  P                  4        R # r#   )r@   r8   r&   rF   rG   s   &&r   r8   #_FirstCompletedWaiter.add_cancellede   rW   r   r   )
r   r   r   r   r1   r5   r8   r   r:   rO   rP   s   @@r   rR   rR   Z   s      r   rR   c                   \   a a ] tR t^it oV 3R ltR tV 3R ltV 3R ltV 3R ltRt	Vt
V ;t# )_AllCompletedWaiterc                p   < Wn         W n        \        P                  ! 4       V n        \
        SV `  4        R # r#   )num_pending_callsstop_on_exceptionr$   rA   rB   r@   r*   )r)   r]   r^   rC   s   &&&r   r*   _AllCompletedWaiter.__init__l   s(    !2!2NN$	r   c                    V P                   ;_uu_ 4        V ;P                  ^,          un        V P                  '       g   V P                  P                  4        RRR4       R#   + '       g   i     R# ; i)   N)rB   r]   r&   rF   r(   s   &r   _decrement_pending_calls,_AllCompletedWaiter._decrement_pending_callsr   sB    YYY""a'")))

  YYYs   AA%%A6	c                F   < \         SV `  V4       V P                  4        R # r#   )r@   r1   rb   rG   s   &&r   r1   _AllCompletedWaiter.add_resultx   s    6"%%'r   c                   < \         SV `  V4       V P                  '       d   V P                  P	                  4        R # V P                  4        R # r#   )r@   r5   r^   r&   rF   rb   rG   s   &&r   r5   !_AllCompletedWaiter.add_exception|   s6    f%!!!JJNN))+r   c                F   < \         SV `  V4       V P                  4        R # r#   )r@   r8   rb   rG   s   &&r   r8   !_AllCompletedWaiter.add_cancelled   s    f%%%'r   )rB   r]   r^   )r   r   r   r   r*   rb   r1   r5   r8   r   r:   rO   rP   s   @@r   r[   r[   i   s#     !(,( (r   r[   c                   2   a  ] tR t^t o R tR tR tRtV tR# )_AcquireFuturesc                2    \        V\        R 7      V n        R# ))keyN)sortedidfutures)r)   rp   s   &&r   r*   _AcquireFutures.__init__   s    g2.r   c                `    V P                    F  pVP                  P                  4        K  	  R # r#   )rp   
_conditionacquirer/   s   & r   	__enter___AcquireFutures.__enter__   "    llF%%' #r   c                `    V P                    F  pVP                  P                  4        K  	  R # r#   )rp   rs   release)r)   argsr0   s   &* r   __exit___AcquireFutures.__exit__   rw   r   )rp   N)	r   r   r   r   r*   ru   r{   r   r:   r;   s   @r   rk   rk      s     /(( (r   rk   c                 R   V\         8X  d   \        4       pMlV\        8X  d   \        4       pMV\	        R  V  4       4      pV\
        8X  d   \        VRR7      pM+V\        8X  d   \        VRR7      pM\        RV,          4      hV  F  pVP                  P                  V4       K   	  V# )c              3   R   "   T F  qP                   \        \        39  x  K  	  R # 5ir#   _stater
   r   .0fs   & r   	<genexpr>._create_and_install_waiters.<locals>.<genexpr>   s!      PLNq!7 BBBs   %'T)r^   FzInvalid return condition: %r)r   r>   r   rR   sumr   r[   r   
ValueError_waitersr.   )fsreturn_whenwaiterpending_countr   s   &&   r   _create_and_install_waitersr      s    m##%		'&( PLNP P /)($OFM)(%PF;kIJJ	

&!  Mr   c              #   $  "   V '       dq   V R,          pV F  pVP                  V4       K  	  VP                  ;_uu_ 4        VP                  P                  V4       RRR4       ?V P                  4       x  Kx  R#   + '       g   i     L'; i5i)ra   N)removers   r   pop)r   r   ref_collectr   futures_sets   &&&  r   _yield_finished_futuresr      se      rF&Kq! '\\\JJf% ffh  \s"   B7BA=B=B	Bc           
   #     "   Ve   V\         P                  ! 4       ,           p\        V 4      p \        V 4      p\	        V 4      ;_uu_ 4        \        R V  4       4      pW,
          p\        V \        4      pR R R 4       \        X4      p \        VXV 3R7       R j  xL
  X'       d   Vf   R pM@X\         P                  ! 4       ,
          pV^ 8  d   \        R\        V4      V3,          4      hVP                  P                  V4       VP                  ;_uu_ 4        VP                  p. Vn        VP                  P                  4        R R R 4       VP                  4        \        WFW3R7       R j  xL
  K   V  F;  pVP                   ;_uu_ 4        VP"                  P%                  V4       R R R 4       K=  	  R #   + '       g   i     ELT; i EL9  + '       g   i     L; i Lt  + '       g   i     K~  ; i  T  FO  pTP                   ;_uu_ 4        TP"                  P%                  X4       R R R 4       K=    + '       g   i     KN  ; i	  i ; i5i)Nc              3   `   "   T F$  pVP                   \        \        39   g   K   Vx  K&  	  R # 5ir#   r   r   s   & r   r   as_completed.<locals>.<genexpr>   s+      Ca88 6AA 2s   .
.)r   z%d (of %d) futures unfinished)time	monotonicrF   lenrk   r   r   listr   TimeoutErrorr&   waitrB   r'   clearreversers   r   r   )	r   timeoutend_timetotal_futuresr   r   r   wait_timeoutr   s	   &&       r   as_completedr      s    $ T^^--	RBGM			 CC C -,R? 
 H~H**8V8:u> 	> 	> #'$..*::!#&;L-?9 9: : LLl+!22*,'""$  .x<>=J J J' 0 A

!!&)  G 
			> J  A

!!&)  s   A
I+G7IH GH *A6H  .G)H 7G,8H ?IG.4IG		IH G)	$	H .G?9	III8
IIIIDoneAndNotDoneFutureszdone not_donec                    \        V 4      p \        V 4      ;_uu_ 4        V  Uu0 uF"  pVP                  \        \        39   g   K   VkK$  	  ppW,
          pV\
        8X  d   V'       d   \        WE4      uuR R R 4       # V\        8X  dX   V'       dP   \        ;QJ d    R V 4       F  '       g   K   RM	  RM! R V 4       4      '       d   \        WE4      uuR R R 4       # \        V4      \        V 4      8X  d   \        WE4      uuR R R 4       # \        W4      pR R R 4       XP                  P                  V4       V  F;  pVP                  ;_uu_ 4        VP                  P                  V4       R R R 4       K=  	  XP!                  VP"                  4       \        W@V,
          4      # u upi   + '       g   i     L; i  + '       g   i     K  ; i)Nc              3   ~   "   T F3  pVP                  4       '       d   K  VP                  4       f   K/  Vx  K5  	  R # 5ir#   )r   	exceptionr   s   & r   r   wait.<locals>.<genexpr>"  s/      Gd++- ,-KKM 1ds   ==
=TF)rF   rk   r   r
   r   r   r   r   anyr   r   r&   r   rs   r   r   updater'   )r   r   r   r   donenot_doner   s   &&&    r   r   r     sh   2 
RB			 F2ahh#98"DD 2 F9?*(8 
	 _,$s Gd Gsss Gd G G G,T< 
	 t9B(8 
	 -R= 
  LLg\\\JJf% \  	KK''( Dy11+F 
	$ \\s^   F/F*F*F/)
F/>F/
F/F/0F/
F/ #F/F/G*F//F?	Gc                       V P                  V4      V P                  4        ? #   T P                  4        i ; i  ? i ; ir#   )resultcancel)futr   s   &&r   _result_or_cancelr   4  s9    	::g&JJL  JJL s   % : 7: =c                      a  ] tR tRt o R tR tR tR tR tR t	R t
R	 tR
 tRR ltRR ltR tR tR t]! ]P(                  4      tRtV tR# )Futurei?  c                    \         P                  ! 4       V n        \        V n        R V n        R V n        . V n        . V n        R # r#   )	r$   	Conditionrs   r   r   _result
_exceptionr   _done_callbacksr(   s   &r   r*   Future.__init__B  s6    #--/!r   c                    V P                    F  p V! V 4       K  	  R#   \         d    \        P                  R T 4        K6  i ; i)!exception calling callback for %rN)r   	ExceptionLOGGERr   )r)   callbacks   & r   _invoke_callbacksFuture._invoke_callbacksK  sC    ,,HL -  L  !DdKLs   !AAc                   V P                   ;_uu_ 4        V P                  \        8X  d   V P                  '       dh   R V P                  P
                  \        V 4      \        V P                  ,          V P                  P                  P
                  3,          uuRRR4       # RV P                  P
                  \        V 4      \        V P                  ,          V P                  P                  P
                  3,          uuRRR4       # RV P                  P
                  \        V 4      \        V P                  ,          3,          uuRRR4       #   + '       g   i     R# ; i)z<%s at %#x state=%s raised %s>Nz <%s at %#x state=%s returned %s>z<%s at %#x state=%s>)	rs   r   r   r   rC   r   ro   _STATE_TO_DESCRIPTION_MAPr   r(   s   &r   __repr__Future.__repr__R  s    ___{{h&???;//41$++>11::	?< < _ >//41$++>..77	A9 9 _ *NN++tH,T[[9-; ; ___s   'EAE$AE=EE$	c                h   V P                   ;_uu_ 4        V P                  \        \        39   d    R R R 4       R# V P                  \        \
        39   d    R R R 4       R# \        V n        V P                   P                  4        R R R 4       V P                  4        R#   + '       g   i     L"; i)NFT)rs   r   r   r   r	   r
   
notify_allr   r(   s   &r   r   Future.cancelf  s}     ___{{w11 _ {{y*@AA _ $DKOO&&(  	  _s   B!B!"%B!!B1	c                    V P                   ;_uu_ 4        V P                  \        \        39   uuR R R 4       #   + '       g   i     R # ; ir#   )rs   r   r	   r
   r(   s   &r   r   Future.cancelledy  s)    ___;;9.D"EE ___s	   9A
	c                    V P                   ;_uu_ 4        V P                  \        8H  uuR R R 4       #   + '       g   i     R # ; ir#   )rs   r   r   r(   s   &r   r   Future.running~  s#    ___;;') ___s	   3A	c                    V P                   ;_uu_ 4        V P                  \        \        \        39   uuR R R 4       #   + '       g   i     R # ; ir#   )rs   r   r	   r
   r   r(   s   &r   r   Future.done  s+    ___;;9.Dh"OO ___s	   >A	c                ^    V P                   e    V P                   hV P                  #   R p i ; ir#   )r   r   r(   s   &r   __get_resultFuture.__get_result  s0    ??&oo%
 << s   ( ,c                V   V P                   ;_uu_ 4        V P                  \        \        \        39  d'   V P
                  P                  V4        R R R 4       R #  R R R 4        V! V 4       R #   + '       g   i     L; i  \         d    \        P                  RT 4        R # i ; i)Nr   )
rs   r   r	   r
   r   r   r.   r   r   r   )r)   fns   &&r   add_done_callbackFuture.add_done_callback  s     ___{{9.Dh"OO$$++B/ _O 	HtH _  	H@$G	Hs   =A0&B 0B 	!B('B(Nc                    V P                   ;_uu_ 4        V P                  \        \        39   d   \	        4       hV P                  \
        8X  d   V P                  4       uuR R R 4       R p # V P                   P                  V4       V P                  \        \        39   d   \	        4       hV P                  \
        8X  d   V P                  4       uuR R R 4       R p # \        4       h  + '       g   i     M; i R p R #   R p i ; ir#   )	rs   r   r	   r
   r   r   _Future__get_resultr   r   r)   r   s   &&r   r   Future.result  s     	;;9.D"EE(**[[H,,,.	 !  D $$W-;;9.D"EE(**[[H,,,. !  D '.( !  D4Ds6   D  A
C( 
D  -A$C(
D  
C((C8	3D   Dc                   V P                   ;_uu_ 4        V P                  \        \        39   d   \	        4       hV P                  \
        8X  d   V P                  uuR R R 4       # V P                   P                  V4       V P                  \        \        39   d   \	        4       hV P                  \
        8X  d   V P                  uuR R R 4       # \        4       h  + '       g   i     R # ; ir#   )	rs   r   r	   r
   r   r   r   r   r   r   s   &&r   r   Future.exception  s    $ ___{{y*@AA$&&(	 _ OO  ){{y*@AA$&&( _ #n$ __s   AC&A C
CC,	c                   V P                   ;_uu_ 4        V P                  \        8X  d;   \        V n        V P                   F  pVP                  V 4       K  	   R R R 4       R# V P                  \        8X  d   \        V n         R R R 4       R# \        P                  R\        V 4      V P                  4       \        R4      h  + '       g   i     R # ; i)NFTz!Future %s in unexpected state: %szFuture in unexpected state)rs   r   r	   r
   r   r8   r   r   r   criticalro   RuntimeError)r)   r   s   & r   set_running_or_notify_cancel#Future.set_running_or_notify_cancel  s    . ___{{i'4"mmF((. ,  _ '% _  C "4 $- ##?@@ __s   AC%!C5CC	c                   V P                   ;_uu_ 4        V P                  \        \        \        09   d&   \        R P                  V P                  V 4      4      hWn        \        V n        V P                   F  pVP                  V 4       K  	  V P                   P                  4        RRR4       V P                  4        R#   + '       g   i     L"; iz{}: {!r}N)rs   r   r	   r
   r   r   formatr   r   r1   r   r   )r)   r   r   s   && r   
set_resultFuture.set_result  s    
 ___{{y*@(KK'
(9(9$++t(LMM!L"DK--!!$' (OO&&(  	  _   BCC	c                   V P                   ;_uu_ 4        V P                  \        \        \        09   d&   \        R P                  V P                  V 4      4      hWn        \        V n        V P                   F  pVP                  V 4       K  	  V P                   P                  4        RRR4       V P                  4        R#   + '       g   i     L"; ir   )rs   r   r	   r
   r   r   r   r   r   r5   r   r   )r)   r   r   s   && r   set_exceptionFuture.set_exception"  s    
 ___{{y*@(KK'
(9(9$++t(LMM'O"DK--$$T* (OO&&(  	  _r   )rs   r   r   r   r   r   r#   )r   r   r   r   r*   r   r   r   r   r   r   r   r   r   r   r   r   r   classmethodtypesGenericAlias__class_getitem__r   r:   r;   s   @r   r   r   ?  sf     "L;(&F
*
P
 H(!F%D&AP!! $E$6$67r   r   c                   Z   a  ] tR tRt o R tRRR^RR/R ltRRR	/R
 lltR tR tRt	V t
R# )Executori3  c                   \        4       hr#   )NotImplementedError)r)   r   rz   kwargss   ""*,r   submitExecutor.submit6  s     "##r   r   N	chunksize
buffersizec                 a aaaaa	a
a Se"   \        S\        4      '       g   \        R4      hSe   S^8  d   \        R4      hSe   S\        P
                  ! 4       ,           o\        V!  oS'       d-   \        P                  ! VV 3R l\        SS4       4       4      o
M$S Uu. uF  pS P                  ! S.VO5!  NK  	  upo
\        P                  ! S 4      o	VVV	VV
VV3R lpV! 4       # u upi )Nz%buffersize must be an integer or Nonezbuffersize must be None or > 0c              3   L   <"   T F  pSP                   ! S.VO5!  x  K  	  R # 5ir#   )r   )r   rz   r   r)   s   & r   r   Executor.map.<locals>.<genexpr>f  s&      #3W4B&&&3Ws   !$c               3      <"    SP                  4        S'       d   S'       dG   S! 4       ;p '       d8   \        S	R 4      ;p'       d$   SP                  V P                  ! S.VO5!  4       Sf   \	        SP                  4       4      x  Kw  \	        SP                  4       S\        P                  ! 4       ,
          4      x  K   S F  pVP                  4        K  	  R #   S F  pTP                  4        K  	  i ; i5ir#   )	r   next
appendleftr   r   r   r   r   r   )
executorrz   r0   r   r   executor_weakrefr   r   r   zipped_iterabless
      r   result_iterator%Executor.map.<locals>.result_iteratorr  s     $

")9);;X;%)*:D%AATAhoob&@4&@A/99/(T^^EU:UVV  !FMMO !bFMMO !s,   C>C  C  C  BC  C> C;;C>)
isinstanceint	TypeErrorr   r   r   zipcollectionsdequer   r   weakrefref)r)   r   r   r   r   	iterablesrz   r   r   r   r   r   s   ffd$d*  @@@@r   mapExecutor.mapA  s    6 !*Z*E*ECDD!j1n=>>!11H	?"" #39:JJ3W# B 6FF5ET$++b(4(5EFB #;;t,	$ 	$&   7 Gs   %C.cancel_futuresFc                   R # r#   r   )r)   r   r  s   &&$r   shutdownExecutor.shutdown  s     	r   c                    V # r#   r   r(   s   &r   ru   Executor.__enter__  s    r   c                *    V P                  R R7       R# )T)r   F)r  )r)   exc_typeexc_valexc_tbs   &&&&r   r{   Executor.__exit__  s    4 r   r   )T)r   r   r   r   r   r  r  ru   r{   r   r:   r;   s   @r   r   r   3  sD     	$D!$ D!! D! D!LE   r   r   c                       ] tR tRtRtR# )BrokenExecutori  r   Nr   r   r   r   r  r    s    r   r  r#   )+
__author__r  loggingr$   r   r   r  	itertoolsr   r   r   r   r   r   r   r	   r
   r   r   	getLoggerr   r   r   r   r   r   objectr!   r>   rR   r[   rk   r   r   r   
namedtupler   r   r   r   r   r   r  r   r   r   <module>r      sP   2
       ## 
	1  YY{Kj  
		/	0	I 		U 	 	 	-f - ,G (' (<(f (,,<*| $..2 } 02fr8V r8hiv iX\ r   