403Webshell
Server IP : 127.0.0.1  /  Your IP : 216.73.216.109
Web Server : Apache/2.4.54 (Win64) OpenSSL/1.1.1q PHP/8.1.10
System : Windows NT DESKTOP-E5T4RUN 10.0 build 19045 (Windows 10) AMD64
User : SERVERWEB ( 0)
PHP Version : 8.1.10
Disable Function : NONE
MySQL : OFF |  cURL : ON |  WGET : OFF |  Perl : OFF |  Python : OFF |  Sudo : OFF |  Pkexec : OFF
Directory :  C:/cygwin64/lib/python3.6/site-packages/pip/_internal/utils/__pycache__/

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : C:/cygwin64/lib/python3.6/site-packages/pip/_internal/utils/__pycache__/parallel.cpython-36.pyc
3

�N�a|�@s^dZddgZddlmZddlmZddlmZddlmZ	ddl
mZmZm
Z
mZmZddlmZeejej	fZed	�Zed
�ZyddlZWnek
r�dZYnXd
ZdZeee
ed�dd��Zdeegefeeee
ed�dd�Zdeegefeeee
ed�dd�Zdeegefeeee
ed�dd�Ze�rReZZneZeZdS)abConvenient 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)�pool)�Callable�Iterable�Iterator�TypeVar�Union)�DEFAULT_POOLSIZE�S�TNTFi��)r�returnc
cs*z
|VWd|j�|j�|j�XdS)z>Return a context manager making sure the pool closes properly.N)�close�joinZ	terminate)r�r�/usr/lib/python3.6/parallel.py�closing.s

r�)�func�iterable�	chunksizercCs
t||�S)z�Make 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.
    )�map)rrrrrr�
_map_fallback;s	rcCs$tt���}|j|||�SQRXdS)z�Chop 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)rrrrrrr�_map_multiprocessGs
rcCs&ttt���}|j|||�SQRXdS)z�Chop 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)rrrrrrr�_map_multithreadUs
r)r)r)r)�__doc__�__all__�
contextlibrZmultiprocessingrrrZmultiprocessing.dummyrZtypingrrr	r
rZpip._vendor.requests.adaptersrr
rZmultiprocessing.synchronize�ImportErrorZ
LACK_SEM_OPENZTIMEOUTr�intrrrrrrrrr�<module>s8





Youez - 2016 - github.com/yon3zu
LinuXploit