+
    i  c                   s    R t ^ RIHt ^ RIt^RIHt ^ RItR t ! R R]P                  4      t	 ! R R]P                  4      t ! R	 R
]P                  4      tR# )z#Implements InterpreterPoolExecutor.)interpretersN)threadc                 s    V! V/ VB #   \          dv   p T P                  T4       h   \        P                   dF    \	        R \
        P                  R7       \        P                  ! T4       T P                  R4        h i ; iRp?ii ; i)zexception is not shareable:)ZfileN)	BaseExceptionZputr    ZNotShareableErrorZprintsysZstderr	tracebackZprint_exception)resultsZfuncargskwargsexcs   &&&& 7/usr/lib64/python3.14/concurrent/futures/interpreter.pydo_callr
   	   s    T$V$$ 
	KK 	 -- 	/cjjA%%c*KK	
s0   
 B
(BAB?BBBB
c                   sN   a  ] tR t^t o ]R 4       tR tR tR tR t	R t
RtV tR# )	WorkerContextc                s   a a R  pVe    V! W/ 4      oMRoV V3R lpWC3#   \          d0    \        T\        4      '       d   T'       d   \        RT: 24      hh i ; i)c                 sP    \        V \        4      '       d   \        R 4      hWV3pV# )zscripts not supported)
isinstancestrZ	TypeError)Zfnr   r   tasks   &&& r	   resolve_taskZ+WorkerContext.prepare.<locals>.resolve_task   s*    "c"" 788&)K    Nz.an initializer script does not take args, got c                  s   < S ! S4      # N )clsinitdatas   r	   create_contextZ-WorkerContext.prepare.<locals>.create_context.   s    x= r   )Z
ValueErrorr   r   )r   initializerinitargsr   r   r   s   f&&  @r	   prepareZWorkerContext.prepare   sn    	 "'rB H	!++  k3//H$'UV^Ua%bccs   	! (A
Ac                s.    Wn         R V n        R V n        R # r   r   interpr   )selfr   s   &&r	   __init__ZWorkerContext.__init__2   s     r   c                sF    V P                   e   V P                  4        R # R # r   )r   finalize)r   s   &r	   __del__ZWorkerContext.__del__7   s    ;;"MMO #r   c                sR   V P                   e   Q V P                   4       h\        P                  ! 4       V n          ^ p\        P                  ! V4      V n        V P
                  '       d   V P                  V P
                  4       R # R #   \         d    T P                  4        h i ; ir   )	r   r    ZcreateZcreate_queuer   r   runr   r   )r   Zmaxsizes   & r	   
initializeZWorkerContext.initialize;   s    {{"/DKK/""))+	G'44W=DL}}}'  	MMO	s   .B	 *B	 	B&c                s    V P                   pV P                  pR V n        R V n         Ve   ?Ve   VP                  4        R # R # r   )r   r   Zclose)r   r   r   s   &  r	   r   ZWorkerContext.finalizeH   s?    ,,LLN r   c                s     V P                   P                  ! \        V P                  .VO5!  #   \        P
                   d'   pT P                  P                  4       pTf   h Y2hR p?ii ; ir   )r   Zcallr
   r   r    ZExecutionFailedZget)r   r   Zwrapperr   s   &&  r	   r   ZWorkerContext.runR   s]    	#;;##GT\\ADAA++ 	#,,""$C{"	#s   ,/ A*!A%%A*r   N)__name__
__module____qualname____firstlineno__classmethodr   r   r   r    r   r   __static_attributes____classdictcell__)__classdict__s   @r	   r   r      s5     , ,,
	# 	#r   r   c                   s    ] tR t^^tRtRtR# )BrokenInterpreterPoolzP
Raised when a worker thread in an InterpreterPoolExecutor failed initializing.
r   N)r!   r"   r#   r$   __doc__r&   r   r   r	   r)   r)   ^   s    r   r)   c                   sJ   a a ] tR t^dt o]t]R 4       tRV 3R lltRt	Vt
V ;t# )InterpreterPoolExecutorc                s,    \         P                  W4      # r   )r   r   )r   r   r   s   &&&r	   prepare_contextZ'InterpreterPoolExecutor.prepare_contexth   s    $$[;;r   c                sb   < T;'       g    RV P                  4        2p\        SV `	  WW44       R# )a  Initializes a new InterpreterPoolExecutor instance.

Args:
    max_workers: The maximum number of interpreters that can be used to
        execute the given calls.
    thread_name_prefix: An optional name prefix to give our threads.
    initializer: A callable or script used to initialize
        each worker interpreter.
    initargs: A tuple of arguments to pass to the initializer.
zInterpreterPoolExecutor-N)Z_counterZsuperr   )r   Zmax_workersZthread_name_prefixr   r   	__class__s   &&&&&r	   r   Z InterpreterPoolExecutor.__init__l   s<     1 M M!9$--/9JK 	$	0r   r   )N Nr   )r!   r"   r#   r$   r)   ZBROKENr%   r,   r   r&   r'   Z__classcell__)r-   r(   s   @@r	   r+   r+   d   s&     "F< <0 0r   r+   )r*   Z
concurrentr    r   r.   r   Z_threadr   r
   r   ZBrokenThreadPoolr)   ZThreadPoolExecutorr+   r   r   r	   <module>r/      sR    ) # 
   B#G)) B#JG44 0g88 0r   