£Á°èZ¨Ä…–K§‚«“ô4“ÒÙ´dîfUÙÃÅ WKbyÊ¦•êŽ…È®FÒ¿ÊÎóCozá¬S@6{Í:›œêZÌ:Š•_%:¢¾¾~;‘Ã~èŠ©ÊÇí`ÔÑ©úë™µ'5I¿fš×WO%ø9¾«¾DK|€ùÍD”Ýs]nHÕ¶ê×Ó¼ãžªéUWŸÈË%DÒÕ¬ï‘]/Åcx  ‰ï2ß]ä6G[]S£ÔÏ¯rs{úëóµmÒï#UQxo·õÞCe]"±/aÙ&Eã4ú9Jé_ÞåëdãöKë)AÞ                  ¯¹ægƒÛowÐø^d™ý½ßB7áyMä9ÜÖUã
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
<html>
3
ReL                 @   s&  d Z ddgZddlmZ ddlmZ ddlmZ ddl	m
Z
 ddlmZ ddlmZ dd	lmZ erdd
lmZmZmZmZmZ ddlmZ eejejf ZedZedZyddlZW n ek
r   dZY nX dZdZedd ZdddZdddZ dddZ!esere Z"Z#ne Z"e!Z#dS )ab  Convenient parallelization of higher order functions.

This module provides two helper functions, with appropriate fallbacks on
Python 2 and on systems lacking support for synchronization mechanisms:

- map_multiprocess
- map_multithread

These helpers work like Python 3's map, with two differences:

- They don't guarantee the order of processing of
  the elements of the iterable.
- The underlying process/thread pools chop the iterable into
  a number of chunks, so that for very long iterables using
  a large value for chunksize can make the job complete much faster
  than using the default value of 1.
map_multiprocessmap_multithread    )contextmanager)Pool)DEFAULT_POOLSIZE)PY2)map)MYPY_CHECK_RUNNING)CallableIterableIteratorUnionTypeVar)poolSTNTFi c          
   c   s*   z
| V  W d| j   | j  | j  X dS )z>Return a context manager making sure the pool closes properly.N)closejoin	terminate)r    r   /builddir/build/BUILDROOT/alt-python36-pip-20.2.4-5.el8.x86_64/opt/alt/python36/lib/python3.6/site-packages/pip/_internal/utils/parallel.pyclosing4   s
    
r      c             C   s
   t | |S )zMake an iterator applying func to each element in iterable.

    This function is the sequential fallback either on Python 2
    where Pool.imap* doesn't react to KeyboardInterrupt
    or when sem_open is unavailable.
    )r   )funciterable	chunksizer   r   r   _map_fallbackB   s    r   c             C   s$   t t }|j| ||S Q R X dS )zChop iterable into chunks and submit them to a process pool.

    For very long iterables using a large value for chunksize can make
    the job complete much faster than using the default value of 1.

    Return an unordered iterator of the results.
    N)r   ProcessPoolimap_unordered)r   r   r   r   r   r   r   _map_multiprocessM   s    	r   c             C   s&   t tt}|j| ||S Q R X dS )zChop iterable into chunks and submit them to a thread pool.

    For very long iterables using a large value for chunksize can make
    the job complete much faster than using the default value of 1.

    Return an unordered iterator of the results.
    N)r   
ThreadPoolr   r   )r   r   r   r   r   r   r   _map_multithreadZ   s    	r!   )r   )r   )r   )$__doc____all__
contextlibr   multiprocessingr   r   Zmultiprocessing.dummyr    Zpip._vendor.requests.adaptersr   Zpip._vendor.sixr   pip._vendor.six.movesr   pip._internal.utils.typingr	   typingr
   r   r   r   r   r   r   r   Zmultiprocessing.synchronizeImportErrorZLACK_SEM_OPENTIMEOUTr   r   r   r!   r   r   r   r   r   r   <module>   s8   




