%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /lib/python3.12/concurrent/futures/__pycache__/
Upload File :
Create Path :
Current File : //lib/python3.12/concurrent/futures/__pycache__/process.cpython-312.pyc

�

���f����"�dZdZddlZddlmZddlZddlZddlZddl	m
Z
ddlZddlZddl
mZddlZddlZddlmZej&�ZdaGd	�d
�Zd�Zej0e�dZd
ZGd�de�ZGd�d�Zd�ZGd�de�Z Gd�de�Z!Gd�de�Z"Gd�de
�Z#d�Z$d�Z%		d'd�Z&d(d�Z'Gd�d ejP�Z)da*da+d!�Z,d"�Z-Gd#�d$ej\�Z/Gd%�d&ej`�Z1y))a-	Implements ProcessPoolExecutor.

The following diagram and text describe the data-flow through the system:

|======================= In-process =====================|== Out-of-process ==|

+----------+     +----------+       +--------+     +-----------+    +---------+
|          |  => | Work Ids |       |        |     | Call Q    |    | Process |
|          |     +----------+       |        |     +-----------+    |  Pool   |
|          |     | ...      |       |        |     | ...       |    +---------+
|          |     | 6        |    => |        |  => | 5, call() | => |         |
|          |     | 7        |       |        |     | ...       |    |         |
| Process  |     | ...      |       | Local  |     +-----------+    | Process |
|  Pool    |     +----------+       | Worker |                      |  #1..n  |
| Executor |                        | Thread |                      |         |
|          |     +----------- +     |        |     +-----------+    |         |
|          | <=> | Work Items | <=> |        | <=  | Result Q  | <= |         |
|          |     +------------+     |        |     +-----------+    |         |
|          |     | 6: call()  |     |        |     | ...       |    |         |
|          |     |    future  |     |        |     | 4, result |    |         |
|          |     | ...        |     |        |     | 3, except |    |         |
+----------+     +------------+     +--------+     +-----------+    +---------+

Executor.submit() called:
- creates a uniquely numbered _WorkItem and adds it to the "Work Items" dict
- adds the id of the _WorkItem to the "Work Ids" queue

Local worker thread:
- reads work ids from the "Work Ids" queue and looks up the corresponding
  WorkItem from the "Work Items" dict: if the work item has been cancelled then
  it is simply removed from the dict, otherwise it is repackaged as a
  _CallItem and put in the "Call Q". New _CallItems are put in the "Call Q"
  until "Call Q" is full. NOTE: the size of the "Call Q" is kept small because
  calls placed in the "Call Q" can no longer be cancelled with Future.cancel().
- reads _ResultItems from "Result Q", updates the future stored in the
  "Work Items" dict and deletes the dict entry

Process #1..n:
- reads _CallItems from "Call Q", executes the calls, and puts the resulting
  _ResultItems in "Result Q"
z"Brian Quinlan (brian@sweetapp.com)�N)�_base)�Queue)�partial)�format_exceptionFc�$�eZdZd�Zd�Zd�Zd�Zy)�
_ThreadWakeupc�X�d|_tjd��\|_|_y)NF)�duplex)�_closed�mp�Pipe�_reader�_writer��selfs �1/usr/lib/python3.12/concurrent/futures/process.py�__init__z_ThreadWakeup.__init__Es �����%'�W�W�E�%:�"���d�l�c��|js<d|_|jj�|jj�yy�NT)rr�closerrs rrz_ThreadWakeup.closeIs7���|�|��D�L��L�L��� ��L�L��� �rc�T�|js|jjd�yy)Nr)rr�
send_bytesrs r�wakeupz_ThreadWakeup.wakeupTs ���|�|��L�L�#�#�C�(�rc��|jsQ|jj�r6|jj�|jj�r�5yyy�N)rr�poll�
recv_bytesrs r�clearz_ThreadWakeup.clearXs@���|�|��,�,�#�#�%����'�'�)��,�,�#�#�%�rN)�__name__�
__module__�__qualname__rrrr�rrrrDs��;�	!�)�*rrc��dattj��}|D]\}}|j	��|D]\}}|j��yr)�_global_shutdown�list�_threads_wakeups�itemsr�join)r(�_�
thread_wakeup�ts    r�_python_exitr-^sZ�����!�'�'�)�*�E�!����=����������1�	����r��=c��eZdZd�Zd�Zy)�_RemoteTracebackc��||_yr��tb)rr4s  rrz_RemoteTraceback.__init__~s	����rc��|jSrr3rs r�__str__z_RemoteTraceback.__str__�s���w�w�rN)r r!r"rr6r#rrr1r1}s���rr1c��eZdZd�Zd�Zy)�_ExceptionWithTracebackc��djtt|�||��}||_d|j_d|z|_y)N�z

"""
%s""")r)r�type�exc�
__traceback__r4)rr<r4s   rrz _ExceptionWithTraceback.__init__�s?��
�W�W�%�d�3�i��b�9�
:�����"&����� �2�%��rc�>�t|j|jffSr)�_rebuild_excr<r4rs r�
__reduce__z"_ExceptionWithTraceback.__reduce__�s���d�h�h����0�0�0rN)r r!r"rr@r#rrr8r8�s��&�1rr8c�&�t|�|_|Sr)r1�	__cause__)r<r4s  rr?r?�s��$�R�(�C�M��Jrc��eZdZd�Zy)�	_WorkItemc�<�||_||_||_||_yr)�future�fn�args�kwargs)rrFrGrHrIs     rrz_WorkItem.__init__�s����������	���rN�r r!r"rr#rrrDrD����rrDc��eZdZdd�Zy)�_ResultItemNc�<�||_||_||_||_yr)�work_id�	exception�result�exit_pid)rrOrPrQrRs     rrz_ResultItem.__init__�s�����"������ ��
r�NNNrJr#rrrMrM�s��!rrMc��eZdZd�Zy)�	_CallItemc�<�||_||_||_||_yr)rOrGrHrI)rrOrGrHrIs     rrz_CallItem.__init__�s����������	���rNrJr#rrrUrU�rKrrUc�.��eZdZdZd�fd�	Z�fd�Z�xZS)�
_SafeQueuez=Safe Queue set exception to the future object linked to a jobc�R��||_||_||_t�|�||��y)N)�ctx)�pending_work_items�
shutdown_lockr+�superr)r�max_sizerZr[r\r+�	__class__s      �rrz_SafeQueue.__init__�s-���"4���*���*���
����s��+rc����t|t�r�tt|�||j�}tdj
dj|���|_|jj|jd�}|j5|jj�ddd�|�|jj!|�yyt"�|�I||�y#1swY�9xYw)Nz

"""
{}"""r:)�
isinstancerUrr;r=r1�formatr)rBr[�poprOr\r+rrF�
set_exceptionr]�_on_queue_feeder_error)r�e�objr4�	work_itemr_s     �rrez!_SafeQueue._on_queue_feeder_error�s�����c�9�%�!�$�q�'�1�a�o�o�>�B�*�>�+@�+@������+M�N�A�K��/�/�3�3�C�K�K��F�I��#�#�
,��"�"�)�)�+�
,�
�$�� � �.�.�q�1�%�
�G�*�1�c�2�
,�
,�s�C%�%C.)r)r r!r"�__doc__rre�
__classcell__�r_s@rrXrX�s���G�,�
3�
3rrXc'�jK�t|�}	ttj||��}|sy|���'�w)z, Iterates over zip()ed iterables in chunks. N)�zip�tuple�	itertools�islice)�	chunksize�	iterables�it�chunks    r�_get_chunksru�s9����	�i��B�
��i�&�&�r�9�5�6������	�s�13c�2�|D�cgc]}||���	c}Scc}w)z� Processes a chunk of an iterable passed to map.

    Runs the function passed to map() on a chunk of the
    iterable passed to map.

    This function is run in a separate process.

    r#)rGrtrHs   r�_process_chunkrw�s��#(�(�$�B��I�(�(��(s�c���	|jt||||���y#t$r=}t||j�}|jt|||���Yd}~yd}~wwxYw)z.Safely send back the given result or exception)rQrPrR�rPrRN)�putrM�
BaseExceptionr8r=)�result_queuerOrQrPrRrfr<s       r�_sendback_resultr}�sh��9�����W�V�/8�8�M�	N���9�%�a����9������W��.6�8�	9�	9��9�s�!�	A'�3A"�"A'c�B�|�	||�d}d}	|j	d��}|�$|jt
j��y|�|dz
}||k\rt
j�}	|j|ji|j��}t||j||��~~|�y��#t$r$tjjdd��YywxYw#t$r9}	t|	|	j�}
t||j|
|�	�Yd}	~	�rd}	~	wwxYw)
a�Evaluates calls from call_queue and places the results in result_queue.

    This worker is run in a separate process.

    Args:
        call_queue: A ctx.Queue of _CallItems that will be read and
            evaluated by the worker.
        result_queue: A ctx.Queue of _ResultItems that will written
            to by the worker.
        initializer: A callable initializer, or None
        initargs: A tuple of args for the initializer
    NzException in initializer:T)�exc_infor��blockr.)rQrRry)r{r�LOGGER�critical�getrz�os�getpidrGrHrIr}rOr8r=)�
call_queuer|�initializer�initargs�	max_tasks�	num_tasksrR�	call_item�rrfr<s           r�_process_workerr��s3����	���"��I��H�
��N�N��N�.�	������R�Y�Y�[�)��� ���N�I��I�%��9�9�;��		��	���i�n�n�A�	�0@�0@�A�A�
�\�9�+<�+<�Q�&.�
0��
����9���	��L�L�!�!�"=��!�M�
�		��*�	0�)�!�Q�_�_�=�C��\�9�+<�+<��&.�
0�
0��	0�s)�B,�'&C�,*C�C�	D�%/D�Dc�l��eZdZdZ�fd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d	�Zd
�Zd�Z
d�Zdd
�Zd�Z�xZS)�_ExecutorManagerThreadatManages the communication between this process and the worker processes.

    The manager is run in a local thread.

    Args:
        executor: A reference to the ProcessPoolExecutor that owns
            this thread. A weakref will be own by the manager as well as
            references to internal objects used to introspect the state of
            the executor.
    c���|j|_|j|_|j|jfd�}t	j
||�|_|j|_|j|_
|j|_|j|_|j|_|j"|_t&�|�Q�y)Nc��tjjd�|5|j�ddd�y#1swYyxYw)Nz?Executor collected: triggering callback for QueueManager wakeup)r�util�debugr)r*r+r\s   r�
weakref_cbz3_ExecutorManagerThread.__init__.<locals>.weakref_cb3s=��
�G�G�M�M�1�
2��
'��$�$�&�
'�
'�
'�s	�<�A)�_executor_manager_thread_wakeupr+�_shutdown_lockr\�weakref�ref�executor_reference�
_processes�	processes�_call_queuer��
_result_queuer|�	_work_ids�work_ids_queue�_max_tasks_per_child�max_tasks_per_child�_pending_work_itemsr[r]r)r�executorr�r_s   �rrz_ExecutorManagerThread.__init__%s����
&�E�E���%�4�4���&*�%7�%7�%)�%7�%7�	'�#*�+�+�h�
�"C���"�,�,���#�.�.���%�2�2���'�0�0���$,�#@�#@�� �#+�">�">���
���rc���		|j�|j	�\}}}|r|j|�y|��|j|�|jdu}|r5|jj|j�}|j�~|j�x}rC|r&|j5|j�ddd�n|jj�~|j�r=|j!�|j�|j"s|j%�y��6#t$r&}t|�}|j|�Yd}~yd}~wwxYw#1swY��xYwr)�add_call_item_to_queuer{r�terminate_broken�wait_result_broken_or_wakeup�process_result_itemrRr�rcr)r�r\�_adjust_process_count�_idle_worker_semaphore�release�is_shutting_down�flag_executor_shutting_downr[�join_executor_internals)rr<�cause�result_item�	is_broken�process_exited�pr�s        r�runz_ExecutorManagerThread.runTsb���
��+�+�-�-1�,M�,M�,O�)�K��E���%�%�e�,���&��(�(��5�!,�!5�!5�T�!A��!����*�*�;�+?�+?�@�A��F�F�H� �#�6�6�8�8�8�8�%�!�/�/�=�$�:�:�<�=�=�!�7�7�?�?�A� ��$�$�&��0�0�2�
�+�+�-��.�.��0�0�2��_��
!�
�(��-���%�%�e�,���
��0=�=�s#�D8�4E*�8	E'�E"�"E'�*E3c��	|jj�ry	|jjd��}|j|}|j
j
�rH|jjt||j|j|j�d��n|j|=����#tj$rYywxYw)NTFr�)r��fullr�r�r[rF�set_running_or_notify_cancelrzrUrGrHrI�queue�Empty)rrOrhs   rr�z-_ExecutorManagerThread.add_call_item_to_queue�s�������#�#�%��
��-�-�1�1��1�>��!�3�3�G�<�	��#�#�@�@�B��O�O�'�'�	�'�2;�,�,�2;�.�.�2;�2B�2B�)D�/3�	(�4��/�/��8��%��
�;�;�
��
�s�B:�:C�Cc��|jj}|jjrJ�|jj}||g}t	|j
j
��D�cgc]}|j��}}tjj||z�}d}d}d}	||vr	|j�}	d}n||vrd}|jj�|	||fScc}w#t$r}
t|
�}Yd}
~
�=d}
~
wwxYw�NTF)r|rr+rr&r��values�sentinelr�
connection�wait�recvr{rr)r�
result_reader�
wakeup_reader�readersr��worker_sentinels�readyr�r�r�r<s           rr�z3_ExecutorManagerThread.wait_result_broken_or_wakeup�s
���)�)�1�1�
��%�%�-�-�-�-��*�*�2�2�
� �-�0��04�T�^�^�5J�5J�5L�0M�N�1�A�J�J�N��N��
�
�"�"�7�-=�#=�>�����	����E�!�
.�+�0�0�2��!�	��e�
#��I�	
��� � �"��I�u�,�,��/O��!�
.�(��-���
.�s�.C(�0C-�-	D�6D�Dc���t|t�r[|j�sJ�|jj	|�}|j�|js|j
�yy|jj	|jd�}|�X|jr&|jj|j�y|jj|j�yyr)ra�intr�r�rcr)r�r[rOrPrFrd�
set_resultrQ)rr�r�rhs    rr�z*_ExecutorManagerThread.process_result_item�s����k�3�'��(�(�*�*�*����"�"�;�/�A�
�F�F�H��>�>��,�,�.��"�
�/�/�3�3�K�4G�4G��N�I��$��(�(��$�$�2�2�;�3H�3H�I��$�$�/�/��0B�0B�C�	%rc�V�|j�}txs|duxs|jSr)r�r%�_shutdown_thread)rr�s  rr�z'_ExecutorManagerThread.is_shutting_down�s4���*�*�,��
!�-�H��$4�-��,�,�	.rc�B�|j�}|�d|_d|_d}td�}|�#t	ddj|��d��|_|jj�D]"\}}	|jj|�~�$|jj�|jj�D]}|j!��|j"j%�|j'd��y#tj$rY��wxYw)NzKA child process terminated abruptly, the process pool is not usable anymoreTz^A process in the process pool was terminated abruptly while the future was running or pending.z
'''
r:z''')�broken)r��_brokenr��BrokenProcessPoolr1r)rBr[r(rFrdr�InvalidStateErrorrr�r��	terminater��_terminate_broken�_join_executor_internals)rr�r��bperOrhr�s       rr�z(_ExecutorManagerThread._terminate_broken�s*���*�*�,����!1�H��)-�H�%��H� �!6�7����,��"�'�'�%�.�)��-�/�C�M�#'�"9�"9�"?�"?�"A�
	��G�Y�
�� � �.�.�s�3��
	�	
���%�%�'����&�&�(�	�A�
�K�K�M�	�	
���)�)�+�	
�%�%�T�%�2��%�*�*�
�
�
�s�4D�D�Dc�h�|j5|j|�ddd�y#1swYyxYwr)r\r�)rr�s  rr�z'_ExecutorManagerThread.terminate_brokens.��
�
�
�	*��"�"�5�)�	*�	*�	*�s�(�1c�d�|j�}|�}d|_|jrii}|jj	�D]%\}}|j
j
�r�!|||<�'||_		|jj��yyy#tj$rYnwxYwd|_�$r�)r�r��_cancel_pending_futuresr[r(rF�cancelr��
get_nowaitr�r�)rr��new_pending_work_itemsrOrhs     rr�z2_ExecutorManagerThread.flag_executor_shutting_downs����*�*�,����(,�H�%��/�/�*,�&�*.�*A�*A�*G�*G�*I�D�&�G�Y�$�+�+�2�2�4�:C�.�w�7�D�+A��'����+�+�6�6�8���0� �� !�;�;�����49��0�s�3B�B'�&B'c�,�|j�}d}||krc|j�dkDrOt||z
�D]#}	|jjd�|dz
}�%||kr|j�dkDr�Myyyy#tj
$rY�3wxYw)Nrr.)�get_n_children_alive�ranger��
put_nowaitr��Full)r�n_children_to_stop�n_sentinels_sent�is    r�shutdown_workersz'_ExecutorManagerThread.shutdown_workers0s���!�6�6�8���� �"4�4��-�-�/�!�3��-�0@�@�A�
����O�O�.�.�t�4�$��)�$�
� �"4�4��-�-�/�!�3�5�3�5���z�z����s� A<�<B�Bc�f�|j5|j�ddd�y#1swYyxYwr)r\r�rs rr�z._ExecutorManagerThread.join_executor_internals>s,��
�
�
�	,��)�)�+�	,�	,�	,�s�'�0c�F�|s|j�|jj�|jj�|jj�|j
j
�D]$}|r|j�|j��&yr)	r�r�r�join_threadr+r�r�r�r))rr�r�s   rr�z/_ExecutorManagerThread._join_executor_internalsBsx����!�!�#�	
���������#�#�%���� � �"����&�&�(�	�A�����
�
�F�F�H�	rc�V�td�|jj�D��S)Nc3�<K�|]}|j����y�wr)�is_alive)�.0r�s  r�	<genexpr>z>_ExecutorManagerThread.get_n_children_alive.<locals>.<genexpr>Us����A�A�1�:�:�<�A�s�)�sumr�r�rs rr�z+_ExecutorManagerThread.get_n_children_aliveSs ���A����)>�)>�)@�A�A�Ar)F)r r!r"rirr�r�r�r�r�r�r�r�r�r�r�r�rjrks@rr�r�sO���	�-�^2�h�.!-�FD�..�-3�^*�9�4�,��"Brr�c��trtrtt��da	ddl}	tjd�}|dk(ry|dk\ryd|zatt��#t$rdatt��wxYw#ttf$rYywxYw)NTrzxThis Python build lacks multiprocessing.synchronize, usually due to named semaphores being unavailable on this platform.�SC_SEM_NSEMS_MAX����z@system provides too few semaphores (%d available, 256 necessary))	�_system_limits_checked�_system_limited�NotImplementedError�multiprocessing.synchronize�ImportErrorr��sysconf�AttributeError�
ValueError)�multiprocessing�	nsems_maxs  r�_check_system_limitsr�\s�����%�o�6�6�!��3�*���J�J�1�2�	��B��	��C��	�4�6?�@�O�
�o�
.�.��+�3�
F�	�"�/�2�2�3��
�J�'����s�A�A7�A4�7B	�B	c#�jK�|D]*}|j�|s�|j���|r��,y�w)z�
    Specialized implementation of itertools.chain.from_iterable.
    Each item in *iterable* should be a list.  This function is
    careful not to keep references to yielded objects.
    N)�reverserc)�iterable�elements  r�_chain_from_iterable_of_listsr|s5����� ��������+�+�-��� �s�3�3�3c��eZdZdZy)r�zy
    Raised when a process in a ProcessPoolExecutor terminated abruptly
    while a future was in the running state.
    N)r r!r"rir#rrr�r��s��rr�c���eZdZ		ddd�d�Zd�Zd�Zd�Zd�Zd�Ze	jjje_dd	d
��fd�
Zddd
�d�Z
e	jjje
_�xZS)�ProcessPoolExecutorN)r�c��t�|�Ptj�xsd|_tj
dk(ret
t|j�|_nE|dkrtd��tj
dk(r|tkDrtdt����||_|�,|�tjd�}ntj�}||_|jjd�	�d
k7|_
|�t|�std��||_||_|�Ut%|t&�std��|dkrtd
��|jjd�	�d
k(rtd��||_d|_i|_d|_t1j2�|_t1j6d�|_d|_d|_i|_d|_ tC�|_"|jtFz}tI||j|j>|j4|jD��|_%d|jJ_&|jO�|_(tSjT�|_+y)aRInitializes a new ProcessPoolExecutor instance.

        Args:
            max_workers: The maximum number of processes that can be used to
                execute the given calls. If None or not given then as many
                worker processes will be created as the machine has processors.
            mp_context: A multiprocessing context to launch the workers created
                using the multiprocessing.get_context('start method') API. This
                object should provide SimpleQueue, Queue and Process.
            initializer: A callable used to initialize worker processes.
            initargs: A tuple of arguments to pass to the initializer.
            max_tasks_per_child: The maximum number of tasks a worker process
                can complete before it will exit and be replaced with a fresh
                worker process. The default of None means worker process will
                live as long as the executor. Requires a non-'fork' mp_context
                start method. When given, we default to using 'spawn' if no
                mp_context is supplied.
        Nr.�win32rz"max_workers must be greater than 0zmax_workers must be <= �spawnF)�
allow_none�forkzinitializer must be a callablez&max_tasks_per_child must be an integerz max_tasks_per_child must be >= 1zpmax_tasks_per_child is incompatible with the 'fork' multiprocessing start method; supply a different mp_context.)r^rZr[r\r+T),r�r��	cpu_count�_max_workers�sys�platform�min�_MAX_WINDOWS_WORKERSr�r�get_context�_mp_context�get_start_method�#_safe_to_dynamically_spawn_children�callable�	TypeError�_initializer�	_initargsrar�r��_executor_manager_threadr�r��	threading�Lockr��	Semaphorer�r��_queue_countr�r�rr��EXTRA_QUEUED_CALLSrXr��
_ignore_epipe�SimpleQueuer�r�rr�)r�max_workers�
mp_contextr�r�r��
queue_sizes       rrzProcessPoolExecutor.__init__�sa��(	���� "���� 3�!�D���|�|�w�&�$'�(<�(,�(9�(9�%;��!��a�� �!E�F�F��,�,�'�)��2�2� �-�.B�-C�D�F�F�!,�D����"�.��^�^�G�4�
��^�^�-�
�%���� � �1�1�U�1�C�v�M�	
�0��"�8�K�+@��<�=�=�'���!����*��1�3�7�� H�I�I�$��)� �!C�D�D����0�0�E�0�B�f�L� �"C�D�D�%8��!�)-��%����!&���'�n�n�.���&/�&9�&9�!�&<��#�������#%�� �',��$�0=���,��&�&�);�;�
�%��T�%5�%5�#�7�7��-�-��>�>�	@���*.����&�'�3�3�5��������rc���|j�d|js|j�t|�|_|jj	�|j
t|j<yyr)rr�_launch_processesr��startr�r'rs r�_start_executor_manager_threadz2ProcessPoolExecutor._start_executor_manager_thread�s`���(�(�0��;�;��&�&�(�,B�4�,H�D�)��)�)�/�/�1��4�4�
�T�:�:�;�
1rc��|jjd��ryt|j�}||jkr|j�yy)NF)�blocking)r��acquire�lenr�r
�_spawn_process)r�
process_counts  rr�z)ProcessPoolExecutor._adjust_process_countsK���&�&�.�.��.�>���D�O�O�,�
��4�,�,�,�
���!�-rc��|jrJd��tt|j�|j�D]}|j��y)NzhProcesses cannot be fork()ed after the thread has started, deadlock in the child processes could result.)rr�r)r�r
r*)rr*s  rr#z%ProcessPoolExecutor._launch_processessS���0�0�	A�@�	A�0��s�4�?�?�+�T�->�->�?�	"�A����!�	"rc��|jjt|j|j|j
|j|jf��}|j�||j|j<y)N)�targetrH)r�Processr�r�r�rrr�r$r��pid)rr�s  rr*z"ProcessPoolExecutor._spawn_processsm�����$�$�"��"�"��$�$��#�#��.�.��+�+�	-�
%�
.��	
���	�!"�������rc�R�|j5|jrt|j��|jrt	d��t
rt	d��t
j�}t||||�}||j|j<|jj|j�|xjdz
c_
|jj�|jr|j!�|j#�|cddd�S#1swYyxYw)Nz*cannot schedule new futures after shutdownz6cannot schedule new futures after interpreter shutdownr.)r�r�r�r��RuntimeErrorr%r�FuturerDr�rr�rzr�rrr�r%)rrGrHrI�f�ws      r�submitzProcessPoolExecutor.submit*s���
�
 �
 �	��|�|�'����5�5��$�$�"�#O�P�P��"�$:�;�;�����A��!�R��v�.�A�:;�D�$�$�T�%6�%6�7��N�N���t�0�0�1�����"���0�0�7�7�9��7�7��*�*�,��/�/�1��+	�	�	�s�DD�D&r.)�timeoutrqc���|dkrtd��t�|�	tt|�t|d|i�|��}t
|�S)ajReturns an iterator equivalent to map(fn, iter).

        Args:
            fn: A callable that will take as many arguments as there are
                passed iterables.
            timeout: The maximum number of seconds to wait. If None, then there
                is no limit on the wait time.
            chunksize: If greater than one, the iterables will be chopped into
                chunks of size chunksize and submitted to the process pool.
                If set to one, the items in the list will be sent one at a time.

        Returns:
            An iterator equivalent to: map(func, *iterables) but the calls may
            be evaluated out-of-order.

        Raises:
            TimeoutError: If the entire result iterator could not be generated
                before the given timeout.
            Exception: If fn(*args) raises for any values.
        r.zchunksize must be >= 1.rq)r7)r�r]�maprrwrur)rrGr7rqrr�resultsr_s      �rr9zProcessPoolExecutor.mapCsQ���*�q�=��6�7�7��'�+�g�n�b�9�)�9�J�	�J�&-��/��-�W�5�5rF)�cancel_futuresc��|j5||_d|_|j�|jj	�ddd�|j
�|r|j
j
�d|_d|_|j�|r|jj�d|_d|_
d|_y#1swY�}xYwr)r�r�r�r�rrr)r�r�rr�)rr�r;s   r�shutdownzProcessPoolExecutor.shutdown`s���
�
 �
 �	>�+9�D�(�$(�D�!��3�3�?��4�4�;�;�=�	>��(�(�4���)�)�.�.�0�)-��%�������)�d����$�$�&�!������/3��,�#	>�	>�s�5B>�>C)NNNr#)T)r r!r"rr%r�r#r*r6r�Executorrir9r=rjrks@rrr�s~���48�,.�l'�GK�l'�\5�
"�"�	#��.�^�^�*�*�2�2�F�N�*.�!�6�:4�E�4�(�~�~�.�.�6�6�H��rrrSr)2ri�
__author__r��concurrent.futuresrr�r�r�multiprocessing.connection�multiprocessing.queuesrrr��	functoolsrror�	tracebackr�WeakKeyDictionaryr'r%rr-�_register_atexitrr�	Exceptionr1r8r?�objectrDrMrUrXrurwr}r��Threadr�r�r�r�r�BrokenExecutorr�r>rr#rr�<module>rKs?��(�T2�
�	�$���"�(�����
�&�-�7�,�,�.����*�*�4��	���<�(������y��	1�	1�����!�&�!����3��3�2�	)�DH�"�	9�3�l|B�Y�-�-�|B�~	����/�@	 ���,�,��e7�%�.�.�e7r

Zerion Mini Shell 1.0