HEX
Server: LiteSpeed
System: Linux kapuas.iixcp.rumahweb.net 5.14.0-427.42.1.el9_4.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Nov 1 14:58:02 EDT 2024 x86_64
User: mirz4654 (1666)
PHP: 8.1.33
Disabled: system,exec,escapeshellarg,escapeshellcmd,passthru,proc_close,proc_get_status,proc_nice,proc_open,proc_terminate,shell_exec,popen,pclose,dl,pfsockopen,leak,apache_child_terminate,posix_kill,posix_mkfifo,posix_setsid,posix_setuid,posix_setpgid,ini_alter,show_source,define_syslog_variables,symlink,syslog,openlog,openlog,closelog,ocinumcols,listen,chgrp,apache_note,apache_setenv,debugger_on,debugger_off,ftp_exec,dll,ftp,myshellexec,socket_bind,mail,posix_getwpuid
Upload Files
File: //opt/alt/python27/lib/python2.7/site-packages/pip/_internal/utils/parallel.pyc
�
^�Rec@s�dZddgZddlmZddlmZddlmZddl	m
Z
ddlmZddl
mZdd	lmZer�dd
lmZmZmZmZmZddlmZeejejfZed�Zed
�ZnyddlZWnek
reZnXeZdZed��Z dd�Z!dd�Z"dd�Z#esferse!Z$Z%ne"Z$e#Z%dS(sbConvenient 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.
tmap_multiprocesstmap_multithreadi����(tcontextmanager(tPool(tDEFAULT_POOLSIZE(tPY2(tmap(tMYPY_CHECK_RUNNING(tCallabletIterabletIteratortUniontTypeVar(tpooltStTNi��ccs/z	|VWd|j�|j�|j�XdS(s>Return a context manager making sure the pool closes properly.N(tclosetjoint	terminate(R
((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el9.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/utils/parallel.pytclosing4s
	

icCs
t||�S(s�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.
    (R(tfunctiterablet	chunksize((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el9.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/utils/parallel.pyt
_map_fallbackBscCs/tt���}|j|||�SWdQXdS(s�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(RtProcessPooltimap_unordered(RRRR
((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el9.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/utils/parallel.pyt_map_multiprocessMs	cCs2ttt���}|j|||�SWdQXdS(s�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(Rt
ThreadPoolRR(RRRR
((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el9.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/utils/parallel.pyt_map_multithreadZs	(&t__doc__t__all__t
contextlibRtmultiprocessingRRtmultiprocessing.dummyRtpip._vendor.requests.adaptersRtpip._vendor.sixRtpip._vendor.six.movesRtpip._internal.utils.typingRttypingRR	R
RRR
RRtmultiprocessing.synchronizetImportErrortTruet
LACK_SEM_OPENtFalsetTIMEOUTRRRRRR(((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el9.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/utils/parallel.pyt<module>s8(