Your IP : 3.143.223.72


Current Path : /opt/alt/python313/lib64/python3.13/concurrent/futures/__pycache__/
Upload File :
Current File : //opt/alt/python313/lib64/python3.13/concurrent/futures/__pycache__/process.cpython-313.pyc

�

���g���� �SrSrSSKrSSKJr SSKrSSKrSSKrSSK	J
r
 SSKrSSKrSSK
Jr SSKrSSKrSSKJr \R&"5rSq"S	S
5rSr\R0"\5 SrS
r"SS\5r"SS5rSr"SS\5r "SS\5r!"SS\5r""SS\
5r#Sr$S&Sjr%S'Sjr&"SS\RN5r(Sq)Sq*S r+S!r,"S"S#\RZ5r."S$S%\R^5r0g)(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�,�\rSrSrSrSrSrSrSrg)�
_ThreadWakeup�Dc��SUl[R"5Ul[R
"SS9uUlUlg)NF)�duplex)�_closed�	threading�Lock�_lock�mp�Pipe�_reader�_writer��selfs �A/opt/alt/python313/lib64/python3.13/concurrent/futures/process.py�__init__�_ThreadWakeup.__init__Es.������^�^�%��
�%'�W�W�E�%:�"���d�l�c���UR UR(d;SUlURR5 URR5 SSS5 g!,(df   g=f�NT)rrr�closerrs rr�_ThreadWakeup.closeJsC���Z�Z��<�<�#������"�"�$����"�"�$�	�Z�Z�s�A
A#�#
A1c��UR UR(dURRS5 SSS5 g!,(df   g=f)Nr)rrr�
send_bytesrs r�wakeup�_ThreadWakeup.wakeupVs,��
�Z�Z��<�<����'�'��,��Z�Z�s�-A�
Ac���UR(a[S5eURR5(a<URR	5 URR5(aM;gg)Nz!operation on closed _ThreadWakeup)r�RuntimeErrorr�poll�
recv_bytesrs r�clear�_ThreadWakeup.clear[sM���<�<��B�C�C��l�l���!�!��L�L�#�#�%��l�l���!�!r)rrrrN)	�__name__�
__module__�__qualname__�__firstlineno__rrr r&�__static_attributes__�rrrrDs��;�

%�-�
&rrc��Sq[[R55nUHupUR	5 M UHup1UR5 M gr)�_global_shutdown�list�_threads_wakeups�itemsr �join)r2�_�
thread_wakeup�ts    r�_python_exitr7bsL�����!�'�'�)�*�E�!�������"����	����r��=c� �\rSrSrSrSrSrg)�_RemoteTraceback�c��Xlg�N��tb)rr@s  rr�_RemoteTraceback.__init__�s���rc��UR$r>r?rs r�__str__�_RemoteTraceback.__str__�s���w�w�rr?N)r(r)r*r+rrCr,r-rrr;r;�s���rr;c� �\rSrSrSrSrSrg)�_ExceptionWithTraceback�c��SR[[U5X55nXlSURlSU-Ulg)N�z

"""
%s""")r3r�type�exc�
__traceback__r@)rrKr@s   rr� _ExceptionWithTraceback.__init__�s;��
�W�W�%�d�3�i��9�
:����"&����� �2�%��rc�>�[URUR44$r>)�_rebuild_excrKr@rs r�
__reduce__�"_ExceptionWithTraceback.__reduce__�s���d�h�h����0�0�0r�rKr@N)r(r)r*r+rrPr,r-rrrFrF�s��&�1rrFc�&�[U5UlU$r>)r;�	__cause__rRs  rrOrO�s��$�R�(�C�M��Jrc��\rSrSrSrSrg)�	_WorkItem�c�4�XlX lX0lX@lgr>)�future�fn�args�kwargs)rrYrZr[r\s     rr�_WorkItem.__init__�s�������	��r)r[rZrYr\N�r(r)r*r+rr,r-rrrVrV����rrVc��\rSrSrSSjrSrg)�_ResultItem�Nc�4�XlX lX0lX@lgr>)�work_id�	exception�result�exit_pid)rrdrerfrgs     rr�_ResultItem.__init__�s����"���� �
r)rergrfrd�NNNr^r-rrrara�s��!rrac��\rSrSrSrSrg)�	_CallItem�c�4�XlX lX0lX@lgr>)rdrZr[r\)rrdrZr[r\s     rr�_CallItem.__init__�s�������	��r)r[rZr\rdNr^r-rrrkrk�r_rrkc�<^�\rSrSrSrSU4SjjrU4SjrSrU=r$)�
_SafeQueue�z=Safe Queue set exception to the future object linked to a jobc�8>�X0lX@l[TU]
XS9 g)N)�ctx)�pending_work_itemsr5�superr)r�max_sizersrtr5�	__class__s     �rr�_SafeQueue.__init__�s���"4��*��
�����+rc�>�[U[5(a�[[U5XR5n[SR
SRU555UlURRURS5nURR5 UbURRU5 gg[ TU]EX5 g)Nz

"""
{}"""rI)�
isinstancerkrrJrLr;�formatr3rTrt�poprdr5r rY�
set_exceptionru�_on_queue_feeder_error)r�e�objr@�	work_itemrws     �rr~�!_SafeQueue._on_queue_feeder_error�s�����c�9�%�%�!�$�q�'�1�o�o�>�B�*�>�+@�+@������+M�N�A�K��/�/�3�3�C�K�K��F�I����%�%�'��$�� � �.�.�q�1�%�
�G�*�1�2r)rtr5)r)	r(r)r*r+�__doc__rr~r,�
__classcell__�rws@rrprp�s���G�,�
3�3rrpc�6�UVs/sHo "U6PM	 sn$s snf)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-)rZ�chunkr[s   r�_process_chunkr��s ��#(�(�%�$�B��I�%�(�(��(s�c	���UR[XX4S95 g![a8n[XUR5nUR[XUS95 SnAgSnAff=f)z.Safely send back the given result or exception)rfrerg�rergN)�putra�
BaseExceptionrFrL)�result_queuerdrfrergrrKs       r�_sendback_resultr��s`��9�����W�/8�M�	N���9�%�a���9������W�.6�8�	9�	9��9�s��
A�.A�Ac�6�UbU"U6 SnSnUR	SS9nUc%UR[R"55 gUbUS-
nXT:�a[R"5nUR"UR0URD6n[XRUUS9 AAUbgM�![a! [RRSSS9 gf=f![a4n	[X�R5n
[XRU
US	9 Sn	A	NnSn	A	ff=f)
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��blockr8)rfrgr�)r�r�LOGGER�critical�getr��os�getpidrZr[r\r�rdrFrL)�
call_queuer��initializer�initargs�	max_tasks�	num_tasksrg�	call_item�rrrKs           r�_process_workerr��s$����	���"��I��H�
��N�N��N�.�	������R�Y�Y�[�)��� ���N�I��%��9�9�;��		����i�n�n�A�	�0@�0@�A�A�
�\�+<�+<�Q�&.�
0��
����9���	��L�L�!�!�"=��!�M�
�		��*�	0�)�!�_�_�=�C��\�+<�+<��&.�
0��	0�s)�B,�)&C�,(C�C�
D�$*D�Dc�x^�\rSrSrSrU4SjrSrSrSrSr	Sr
S	rS
rSr
SrS
rSSjrSrSrU=r$)�_ExecutorManagerThreadiaXManages 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�>�URUlURUlUR[R
R4Sjn[R"X5Ul	URUlURUl
URUlUR UlUR$UlUR(Ul[,TU]]5 g)Nc�4�U"S5 UR5 g)Nz?Executor collected: triggering callback for QueueManager wakeup)r )r4r5�
mp_util_debugs   r�
weakref_cb�3_ExecutorManagerThread.__init__.<locals>.weakref_cb*s��
�1�
2�� � �"r)�_executor_manager_thread_wakeupr5�_shutdown_lock�
shutdown_lockr�util�debug�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_itemsrtrur)r�executorr�rws   �rr�_ExecutorManagerThread.__init__s����
&�E�E���%�4�4���&*�%7�%7�%'�W�W�]�]�	#�#*�+�+�h�"C���"�,�,���#�.�.���%�2�2���'�0�0���$,�#@�#@�� �#+�">�">���
���rc�6�UR5 UR	5up4nU(aURU5 gUb�URU5 URSLnU(a5URRUR5nUR5 AUR5=n(aHU(a&UR UR5 SSS5 OURR5 AUR5(aBUR!5 UR5 UR"(dUR%5 gGMU![a&n[U5nURU5 SnAgSnAff=f!,(df   N�=fr>)�add_call_item_to_queuer�r�terminate_broken�wait_result_broken_or_wakeup�process_result_itemrgr�r|r3r�r��_adjust_process_count�_idle_worker_semaphore�release�is_shutting_down�flag_executor_shutting_downrt�join_executor_internals)rrK�cause�result_item�	is_broken�process_exited�pr�s        r�run�_ExecutorManagerThread.runJsZ���
��+�+�-�-1�,M�,M�,O�)�K�E���%�%�e�,���&��(�(��5�!,�!5�!5�T�!A��!����*�*�;�+?�+?�@�A��F�F�H� �#�6�6�8�8�8�8�%�!�/�/�$�:�:�<�0�/�!�7�7�?�?�A� ��$�$�&�&��0�0�2�
�+�+�-��.�.��0�0�2��_��
!�
�(��-���%�%�e�,���
��00�/�s#�E�F
�
F�!F�F�

Fc��URR5(agURRSS9nURUnUR
R
5(aEURR[UURURUR5SS9 OURU	M�M�![Ra gf=f)NTFr�)r��fullr�r�rtrY�set_running_or_notify_cancelr�rkrZr[r\�queue�Empty)rrdr�s   rr��-_ExecutorManagerThread.add_call_item_to_queue~s�������#�#�%�%��
��-�-�1�1��1�>��!�3�3�G�<�	��#�#�@�@�B�B��O�O�'�'�	�'�2;�,�,�2;�.�.�2;�2B�2B�)D�/3�	(�4��/�/��8��%��
�;�;�
��
�s�C�C�Cc�*�URRnURR(aeURRnX/n[	UR
R
55Vs/sHoDRPM nn[RRX5-5nSnSnSn	X;aUR5n	SnOX&;aSnURR5 X�U4$s snf![an
[U
5nSn
A
N=Sn
A
ff=f�NTF)r�rr5rr0r��values�sentinelr�
connection�wait�recvr�rr&)r�
result_reader�
wakeup_reader�readersr��worker_sentinels�readyr�r�r�rKs           rr��3_ExecutorManagerThread.wait_result_broken_or_wakeup�s����)�)�1�1�
��%�%�-�-�-�-��*�*�2�2�
� �0��04�T�^�^�5J�5J�5L�0M�N�0M�1�J�J�0M��N��
�
�"�"�7�#=�>�����	����!�
.�+�0�0�2��!�	��
#��I���� � �"��u�,�,��%O��!�
.�(��-���
.�s�2C.�6C3�3
D�=D
�
Dc��URRURS5nUb]UR(a&URRUR5 gURR
UR5 ggr>)rtr|rdrerYr}�
set_resultrf)rr�r�s   rr��*_ExecutorManagerThread.process_result_item�sj��
�+�+�/�/��0C�0C�T�J�	�� ��$�$�� � �.�.�{�/D�/D�E�� � �+�+�K�,>�,>�?�	!rc�j�UR5n[=(d USL=(d UR$r>)r�r/�_shutdown_thread)rr�s  rr��'_ExecutorManagerThread.is_shutting_down�s4���*�*�,��
!�-�H��$4�-��,�,�	.rc�H�UR5nUbSUlSUlSn[S5nUb#[	SSRU5S35UlURR5H"upEURRU5 AM$ URR5 URR5HnUR!5 M UR"R%5 UR'SS9 g![Ra N�f=f)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
'''
rIz''')�broken)r��_brokenr��BrokenProcessPoolr;r3rTrtr2rYr}r�InvalidStateErrorr&r�r��	terminater��_terminate_broken�_join_executor_internals)rr�r��bperdr�r�s       rr��(_ExecutorManagerThread._terminate_broken�s���*�*�,����!1�H��)-�H�%��H� �!6�7����,��"�'�'�%�.�)��-�/�C�M�#'�"9�"9�"?�"?�"A��G�
�� � �.�.�s�3��#B�	
���%�%�'����&�&�(�A�
�K�K�M�)�	
���)�)�+�	
�%�%�T�%�2��%�*�*�
�
�
�s�5D
�
D!� D!c�r�UR URU5 SSS5 g!,(df   g=fr>)r�r�)rr�s  rr��'_ExecutorManagerThread.terminate_broken�s%��
�
�
��"�"�5�)� �
�
�s�(�
6c�|�UR5nUb�SUlUR(an0nURR	5H*up4UR
R
5(aM&XBU'M, X lURR5 Mgg![Ra Of=fSUlgr�)r�r��_cancel_pending_futuresrtr2rY�cancelr��
get_nowaitr�r�)rr��new_pending_work_itemsrdr�s     rr��2_ExecutorManagerThread.flag_executor_shutting_down�s����*�*�,����(,�H�%��/�/�*,�&�*.�*A�*A�*G�*G�*I�&�G�$�+�+�2�2�4�4�:C�w�7�+J�+A�'����+�+�6�6�8��0� �� !�;�;�����49��0s�>B�B3�2B3c�8�UR5nSnX!:agUR5S:�aR[X-
5H$nURRS5 US-
nM& X!:aUR5S:�aMPgggg![R
a  M7f=f)Nrr8)�get_n_children_alive�ranger��
put_nowaitr��Full)r�n_children_to_stop�n_sentinels_sent�is    r�shutdown_workers�'_ExecutorManagerThread.shutdown_workerss���!�6�6�8���� �4��-�-�/�!�3��-�@�A����O�O�.�.�t�4�$��)�$�B� �4��-�-�/�!�3�5�3�5���z�z����s� B�B�Bc�p�UR UR5 SSS5 g!,(df   g=fr>)r�r�rs rr��._ExecutorManagerThread.join_executor_internals%s#��
�
�
��)�)�+� �
�
�s�'�
5c�^�U(dUR5 URR5 URR5 URR5 UR
R
5H*nU(aUR5 UR5 M, gr>)	r�r�r�join_threadr5r�r�r�r3)rr�r�s   rr��/_ExecutorManagerThread._join_executor_internals)ss����!�!�#�	
���������#�#�%���� � �"����&�&�(�A�����
�
�F�F�H�)rc�V�[SURR555$)Nc3�@# �UHoR5v� M g7fr>)�is_alive)�.0r�s  r�	<genexpr>�>_ExecutorManagerThread.get_n_children_alive.<locals>.<genexpr><s���A�)@�A�:�:�<�<�)@�s�)�sumr�r�rs rr��+_ExecutorManagerThread.get_n_children_alive:s ���A����)>�)>�)@�A�A�Ar)	r�r�r�rtr�r�r�r5r�)F)r(r)r*r+r�rr�r�r�r�r�r�r�r�r�r�r�r�r,r�r�s@rr�r�sT���	�,�\2�h�.-�<@�.�-3�^*�9�4�,��"B�Brr�c�6�[(a[(a[[5eSqSSKn[
R"S5nUS:XagUS:�agSU-q[[5e![a Sq[[5ef=f![[4a gf=f)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_limitsrCs������?�%�o�6�6�!��3�*���J�J�1�2�	��B��	��C��	�4�6?�@�O�
�o�
.�.��+�3�
F�	�"�/�2�2�3��
�J�'����s�A&�B�&B�B�Bc#�# �UH7nUR5 U(dMUR5v� U(aMM9 g7f)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)�reverser|)�iterable�elements  r�_chain_from_iterable_of_listsr!cs3����������g��+�+�-���g��s�A�A�Ac��\rSrSrSrSrg)r�iozm
Raised when a process in a ProcessPoolExecutor terminated abruptly
while a future was in the running state.
r-N)r(r)r*r+r�r,r-rrr�r�os��rr�c�^�\rSrSrSSS.SjjrSrSrSrSrS	r	\
RRR\	lSS
S.U4Sjjr
SS
S.Sjjr\
RRR\lSrU=r$)�ProcessPoolExecutorivN)r�c��[5 UcW[R"5=(d SUl[R
S:Xa[
[UR5UlOGUS::a[S5e[R
S:XaU[:�a[S[35eXlUc/Ub[R"S5nO[R"5nX lURRSS	9S
:gUl
Ub[U5(d[S5eX0lX@lUbY[%U[&5(d[S5eUS::a[S
5eURRSS	9S
:Xa[S5eXPlSUl0UlSUl[0R2"5Ul[0R6"S5UlSUlSUl0UlSUl [C5Ul"UR[F-n[IX`RUR>URDS9Ul%SURJl&URO5Ul([RRT"5Ul+g)a�Initializes 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.
Nr8�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.)rvrsrtr5T),rr��process_cpu_count�_max_workers�sys�platform�min�_MAX_WINDOWS_WORKERSrr�get_context�_mp_context�get_start_method�#_safe_to_dynamically_spawn_children�callable�	TypeError�_initializer�	_initargsrz�intr��_executor_manager_threadr�r�r
rr��	Semaphorer�r��_queue_countr�r�rr��EXTRA_QUEUED_CALLSrpr��
_ignore_epipe�SimpleQueuer�r�rr�)r�max_workers�
mp_contextr�r�r��
queue_sizes       rr�ProcessPoolExecutor.__init__wsV��(	���� "� 4� 4� 6� ;�!�D���|�|�w�&�$'�(<�(,�(9�(9�%;��!���a�� �!E�F�F��,�,�'�)��2�2� �-�.B�-C�D�F�F�!,����"�.��^�^�G�4�
��^�^�-�
�%��� � �1�1�U�1�C�v�M�	
�0��"�8�K�+@�+@��<�=�=�'��!���*��1�3�7�7�� H�I�I�$��)� �!C�D�D����0�0�E�0�B�f�L� �"C�D�D�%8�!�)-��%����!&���'�n�n�.���&/�&9�&9�!�&<��#�������#%�� �',��$�0=���,��&�&�);�;�
�%��%5�%5�#�7�7��>�>�@���*.����&�'�3�3�5��������rc���URciUR(dUR5 [U5UlURR	5 UR
[UR'ggr>)r9r3�_launch_processesr��startr�r1rs r�_start_executor_manager_thread�2ProcessPoolExecutor._start_executor_manager_thread�s`���(�(�0��;�;��&�&�(�,B�4�,H�D�)��)�)�/�/�1��4�4�
�T�:�:�;�
1rc��URRSS9(ag[UR5nXR:aUR5 gg)NF)�blocking)r��acquire�lenr�r+�_spawn_process)r�
process_counts  rr��)ProcessPoolExecutor._adjust_process_count�sI���&�&�.�.��.�>���D�O�O�,�
��,�,�,�
���!�-rc��UR(aS5e[[UR5UR5HnUR5 M g)NzhProcesses cannot be fork()ed after the thread has started, deadlock in the child processes could result.)r9r�rKr�r+rL)rr4s  rrD�%ProcessPoolExecutor._launch_processes�sO���0�0�	A�@�	A�0��s�4�?�?�+�T�->�->�?�A����!�@rc��URR[URURUR
URUR4S9nUR5 XRUR'g)N)�targetr[)r1�Processr�r�r�r6r7r�rEr��pid)rr�s  rrL�"ProcessPoolExecutor._spawn_processsk�����$�$�"��"�"��$�$��#�#��.�.��+�+�	-�
%�
.��	
���	�!"������rc��UR UR(a[UR5eUR(a[	S5e[
(a[	S5e[R"5n[XAX#5nXPRUR'URRUR5 U=RS-
sl
URR5 UR(aUR!5 UR#5 UsSSS5 $!,(df   g=f)Nz*cannot schedule new futures after shutdownz6cannot schedule new futures after interpreter shutdownr8)r�r�r�r�r#r/r�FuturerVr�r;r�r�r�r r3r�rF)rrZr[r\�f�ws      r�submit�ProcessPoolExecutor.submits���
�
 �
 ��|�|�'����5�5��$�$�"�#O�P�P���"�$:�;�;�����A��!��.�A�:;�$�$�T�%6�%6�7��N�N���t�0�0�1�����"���0�0�7�7�9��7�7��*�*�,��/�/�1��+!�
 �
 �s�DD/�/
D=r8)�timeout�	chunksizec�>�US:a[S5e[TU]	[[U5[
R"[U6U5US9n[U5$)a�Returns 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.
r8zchunksize must be >= 1.)r\)	rru�maprr��	itertools�batched�zipr!)rrZr\r]�	iterables�resultsrws      �rr_�ProcessPoolExecutor.map(sX���*�q�=��6�7�7��'�+�g�n�b�9�'�/�/��Y���K�&-��/��-�W�5�5rF)�cancel_futuresc��UR X lSUlURbURR	5 SSS5 UR
b!U(aUR
R
5 SUlSUlURb!U(aURR5 SUlSUl
SUlg!,(df   N�=fr)r�r�r�r�r r9r3r�r�rr�)rr�rfs   r�shutdown�ProcessPoolExecutor.shutdownEs���
�
 �
 �+9�(�$(�D�!��3�3�?��4�4�;�;�=�!��(�(�4���)�)�.�.�0�)-��%�������)�d����$�$�&�!������/3��,�#!�
 �s�5C
�

C)r�r�r�r9r�r�r7r6r�r+r1r�r�r;r�r3r�r�r�)NNNr-)T)r(r)r*r+rrFr�rDrLrZr�Executorr�r_rhr,r�r�s@rr$r$vs����48�,.�j'�GK�j'�X5�
"�"�	#��.�^�^�*�*�2�2�F�N�*.�!�6�6�:4�E�4�(�~�~�.�.�6�6�H��rr$rir>)1r��
__author__r��concurrent.futuresrr�rr�multiprocessing.connection�multiprocessing.queuesrr
r��	functoolsrr`r,�	tracebackr�WeakKeyDictionaryr1r/rr7�_register_atexitr<r/�	Exceptionr;rFrO�objectrVrarkrpr�r�r��Threadr�rrrr!�BrokenExecutorr�rjr$r-rr�<module>rws6��(�T2�
�	�$���"�(�����
�&��,�,�.����&�&�<�
���<�(������y��	1�	1�����!�&�!����3��3�,	)�DH�"�	9�3�llB�Y�-�-�lB�^	����/�@	 ���,�,��c7�%�.�.�c7r

?>