/usr/lib64/python3.9/multiprocessing/__pycache__
NameSizeModeActions
connection.cpython-39.opt-1.pyc254080644editdlrm
connection.cpython-39.opt-2.pyc234090644editdlrm
connection.cpython-39.pyc256150644editdlrm
context.cpython-39.opt-1.pyc130200644editdlrm
context.cpython-39.opt-2.pyc115600644editdlrm
context.cpython-39.pyc130200644editdlrm
forkserver.cpython-39.opt-1.pyc83710644editdlrm
forkserver.cpython-39.opt-2.pyc75840644editdlrm
forkserver.cpython-39.pyc84170644editdlrm
heap.cpython-39.opt-1.pyc76250644editdlrm
heap.cpython-39.opt-2.pyc74450644editdlrm
heap.cpython-39.pyc76350644editdlrm
managers.cpython-39.opt-1.pyc407120644editdlrm
managers.cpython-39.opt-2.pyc367350644editdlrm
managers.cpython-39.pyc409080644editdlrm
pool.cpython-39.opt-1.pyc250910644editdlrm
pool.cpython-39.opt-2.pyc232230644editdlrm
pool.cpython-39.pyc251380644editdlrm
popen_fork.cpython-39.opt-1.pyc25120644editdlrm
popen_fork.cpython-39.opt-2.pyc25120644editdlrm
popen_fork.cpython-39.pyc25120644editdlrm
popen_forkserver.cpython-39.opt-1.pyc24450644editdlrm
popen_forkserver.cpython-39.opt-2.pyc24450644editdlrm
popen_forkserver.cpython-39.pyc24450644editdlrm
popen_spawn_posix.cpython-39.opt-1.pyc23480644editdlrm
popen_spawn_posix.cpython-39.opt-2.pyc23480644editdlrm
popen_spawn_posix.cpython-39.pyc23480644editdlrm
popen_spawn_win32.cpython-39.opt-1.pyc34360644editdlrm
popen_spawn_win32.cpython-39.opt-2.pyc33550644editdlrm
popen_spawn_win32.cpython-39.pyc34570644editdlrm
process.cpython-39.opt-1.pyc104000644editdlrm
process.cpython-39.opt-2.pyc89520644editdlrm
process.cpython-39.pyc110090644editdlrm
queues.cpython-39.opt-1.pyc101170644editdlrm
queues.cpython-39.opt-2.pyc99630644editdlrm
queues.cpython-39.pyc101760644editdlrm
reduction.cpython-39.opt-1.pyc82850644editdlrm
reduction.cpython-39.opt-2.pyc75450644editdlrm
reduction.cpython-39.pyc82850644editdlrm
resource_sharer.cpython-39.opt-1.pyc52410644editdlrm
resource_sharer.cpython-39.opt-2.pyc48210644editdlrm
resource_sharer.cpython-39.pyc52840644editdlrm
resource_tracker.cpython-39.opt-1.pyc53880644editdlrm
resource_tracker.cpython-39.opt-2.pyc50280644editdlrm
resource_tracker.cpython-39.pyc54570644editdlrm
sharedctypes.cpython-39.opt-1.pyc70480644editdlrm
sharedctypes.cpython-39.opt-2.pyc67840644editdlrm
sharedctypes.cpython-39.pyc70970644editdlrm
shared_memory.cpython-39.opt-1.pyc142320644editdlrm
shared_memory.cpython-39.opt-2.pyc115000644editdlrm
shared_memory.cpython-39.pyc144420644editdlrm
spawn.cpython-39.opt-1.pyc66780644editdlrm
spawn.cpython-39.opt-2.pyc62010644editdlrm
spawn.cpython-39.pyc67210644editdlrm
synchronize.cpython-39.opt-1.pyc110870644editdlrm
synchronize.cpython-39.opt-2.pyc110870644editdlrm
synchronize.cpython-39.pyc113880644editdlrm
util.cpython-39.opt-1.pyc114700644editdlrm
util.cpython-39.opt-2.pyc106500644editdlrm
util.cpython-39.pyc115060644editdlrm
__init__.cpython-39.opt-1.pyc6540644editdlrm
__init__.cpython-39.opt-2.pyc6540644editdlrm
__init__.cpython-39.pyc6540644editdlrm
Edit: /usr/lib64/python3.9/multiprocessing/__pycache__/pool.cpython-39.pyc (25138B)
a ´i+ã@s`ddgZddlZddlZddlZddlZddlZddlZddlZddlZddl Z ddl m Z ddl m Z m Z ddlmZdZd Zd Zd Ze ¡Zd d „Zdd„ZGdd„deƒZGdd„dƒZdd„ZGdd„deƒZd*dd„Zdd„ZGdd„deƒZ Gd d„de!ƒZ"Gd!d"„d"e!ƒZ#e#Z$Gd#d$„d$e#ƒZ%Gd%d&„d&e!ƒZ&Gd'd(„d(e&ƒZ'Gd)d„de"ƒZ(dS)+ÚPoolÚ ThreadPooléNé)Úutil)Ú get_contextÚ TimeoutError)ÚwaitÚINITÚRUNÚCLOSEÚ TERMINATEcCs tt|ŽƒS©N)ÚlistÚmap©Úargs©rú,/usr/lib64/python3.9/multiprocessing/pool.pyÚmapstar/srcCstt |d|d¡ƒS)Nrr)rÚ itertoolsÚstarmaprrrrÚ starmapstar2src@seZdZdd„Zdd„ZdS)ÚRemoteTracebackcCs ||_dSr ©Útb)ÚselfrrrrÚ__init__:szRemoteTraceback.__init__cCs|jSr r©rrrrÚ__str__<szRemoteTraceback.__str__N)Ú__name__Ú __module__Ú __qualname__rrrrrrr9src@seZdZdd„Zdd„ZdS)ÚExceptionWithTracebackcCs0t t|ƒ||¡}d |¡}||_d||_dS)NÚz """ %s""")Ú tracebackÚformat_exceptionÚtypeÚjoinÚexcr)rr(rrrrr@s zExceptionWithTraceback.__init__cCst|j|jffSr )Ú rebuild_excr(rrrrrÚ __reduce__Esz!ExceptionWithTraceback.__reduce__N)rr r!rr*rrrrr"?sr"cCst|ƒ|_|Sr )rÚ __cause__)r(rrrrr)Hs r)cs0eZdZdZ‡fdd„Zdd„Zdd„Z‡ZS)ÚMaybeEncodingErrorzVWraps possible unpickleable errors, so they can be safely sent through the socket.cs.t|ƒ|_t|ƒ|_tt|ƒ |j|j¡dSr )Úreprr(ÚvalueÚsuperr,r)rr(r.©Ú __class__rrrTs  zMaybeEncodingError.__init__cCsd|j|jfS)Nz(Error sending result: '%s'. Reason: '%s')r.r(rrrrrYsÿzMaybeEncodingError.__str__cCsd|jj|fS)Nz<%s: %s>)r1rrrrrÚ__repr__]szMaybeEncodingError.__repr__)rr r!Ú__doc__rrr2Ú __classcell__rrr0rr,Ps r,rFc CsÒ|dur(t|tƒr|dks(td |¡ƒ‚|j}|j}t|dƒrR|j ¡|j  ¡|durb||Žd}|dus~|�rÀ||k�rÀz |ƒ} Wn&t t fy®t   d¡Y�qÀYn0| durÆt   d¡�qÀ| \} } } } }zd| | i|¤Žf}WnJt�y4}z0|�r| tu�rt||jƒ}d|f}WYd}~n d}~00z|| | |fƒWnTt�yœ}z:t||dƒ}t   d |¡|| | d|ffƒWYd}~n d}~00d} } }} } }|d7}qft   d |¡dS) NrzMaxtasks {!r} is not validÚ_writerrz)worker got EOFError or OSError -- exitingzworker got sentinel -- exitingTFz0Possible encoding error while sending result: %szworker exiting after %d tasks)Ú isinstanceÚintÚAssertionErrorÚformatÚputÚgetÚhasattrr5ÚcloseÚ_readerÚEOFErrorÚOSErrorrÚdebugÚ ExceptionÚ_helper_reraises_exceptionr"Ú __traceback__r,)ÚinqueueÚoutqueueÚ initializerÚinitargsZmaxtasksÚwrap_exceptionr:r;Z completedÚtaskÚjobÚiÚfuncrÚkwdsÚresultÚeÚwrappedrrrÚworkerasNÿ        ÿ( rRcCs|‚dS)z@Pickle-able helper function for use by _guarded_task_generation.Nr)ÚexrrrrCŽsrCcs2eZdZdZddœ‡fdd„ Z‡fdd„Z‡ZS)Ú _PoolCachezò Class that implements a cache for the Pool class that will notify the pool management threads every time the cache is emptied. The notification is done by the use of a queue that is provided when instantiating the cache. N©Únotifiercs||_tƒj|i|¤ŽdSr )rVr/r)rrVrrNr0rrr�sz_PoolCache.__init__cs tƒ |¡|s|j d¡dSr )r/Ú __delitem__rVr:)rÚitemr0rrrW¡s z_PoolCache.__delitem__)rr r!r3rrWr4rrr0rrT–srTc@s†eZdZdZdZedd„ƒZdLdd„Zej e fd d „Z d d „Z d d„Z edd„ƒZedd„ƒZdd„Zedd„ƒZedd„ƒZdd„Zdd„Zdifdd„ZdMdd „ZdNd!d"„ZdOd#d$„Zd%d&„ZdPd(d)„ZdQd*d+„Zdiddfd,d-„ZdRd.d/„ZdSd0d1„ZedTd2d3„ƒZe d4d5„ƒZ!ed6d7„ƒZ"ed8d9„ƒZ#ed:d;„ƒZ$dd?„Z&d@dA„Z'dBdC„Z(edDdE„ƒZ)e dFdG„ƒZ*dHdI„Z+dJdK„Z,dS)UrzS Class which supports an async version of applying functions to arguments. TcOs|j|i|¤ŽSr ©ÚProcess)ÚctxrrNrrrrZ³sz Pool.ProcessNrcCsg|_t|_|ptƒ|_| ¡t ¡|_|j ¡|_ t |j d�|_ ||_ ||_ ||_|durjt ¡phd}|dkrztdƒ‚|dur’t|ƒs’tdƒ‚||_z | ¡WnFtyê|jD]}|jdur¸| ¡q¸|jD] }| ¡qÖ‚Yn0| ¡}tjtj|j |j|j|j|j|j|j |j!|j |j|j |j"||j fd�|_#d|j#_$t%|j#_|j# &¡tjtj'|j|j(|j!|j|j fd�|_)d|j)_$t%|j)_|j) &¡tjtj*|j!|j+|j fd�|_,d|j,_$t%|j,_|j, &¡t-j.||j/|j|j |j!|j|j |j#|j)|j,|j f dd�|_0t%|_dS) NrUrz&Number of processes must be at least 1zinitializer must be a callable©ÚtargetrTé)rÚ exitpriority)1Ú_poolr Ú_staterÚ_ctxÚ _setup_queuesÚqueueÚ SimpleQueueÚ _taskqueueÚ_change_notifierrTÚ_cacheÚ_maxtasksperchildÚ _initializerÚ _initargsÚosÚ cpu_countÚ ValueErrorÚcallableÚ TypeErrorÚ _processesÚ_repopulate_poolrBÚexitcodeÚ terminater'Ú_get_sentinelsÚ threadingÚThreadrÚ_handle_workersrZÚ_inqueueÚ _outqueueÚ_wrap_exceptionÚ_worker_handlerÚdaemonr ÚstartÚ _handle_tasksÚ _quick_putÚ _task_handlerÚ_handle_resultsÚ _quick_getÚ_result_handlerrÚFinalizeÚ_terminate_poolÚ _terminate)rÚ processesrGrHÚmaxtasksperchildÚcontextÚpÚ sentinelsrrrr·s~             ýþ  ÿþ þ  þûz Pool.__init__cCs>|j|kr:|d|›�t|d�t|ddƒdur:|j d¡dS)Nz&unclosed running multiprocessing pool )Úsourcerg)raÚResourceWarningÚgetattrrgr:)rÚ_warnr rrrÚ__del__s   ÿz Pool.__del__c Cs0|j}d|j›d|j›d|j›dt|jƒ›d� S)Nú<Ú.z state=z pool_size=ú>)r1r r!raÚlenr`)rÚclsrrrr2s ÿþz Pool.__repr__cCs |jjg}|jjg}g|¢|¢Sr )rzr>rg)rZtask_queue_sentinelsZself_notifier_sentinelsrrrrus  zPool._get_sentinelscCsdd„|DƒS)NcSsg|]}t|dƒr|j‘qS)Úsentinel)r<r—)Ú.0rRrrrÚ s ÿz.Pool._get_worker_sentinels..r©ÚworkersrrrÚ_get_worker_sentinelssÿzPool._get_worker_sentinelscCsPd}ttt|ƒƒƒD]6}||}|jdurt d|¡| ¡d}||=q|S)z�Cleanup after any worker processes which have exited due to reaching their specified lifetime. Returns True if any workers were cleaned up. FNúcleaning up worker %dT)ÚreversedÚranger•rsrrAr')ÚpoolZcleanedrLrRrrrÚ_join_exited_workerss zPool._join_exited_workersc Cs0| |j|j|j|j|j|j|j|j|j |j ¡ Sr ) Ú_repopulate_pool_staticrbrZrqr`ryrzrjrkrir{rrrrrr.s úzPool._repopulate_poolc Csft|t|ƒƒD]P} ||t|||||| fd�} | j dd¡| _d| _|  ¡| | ¡t  d¡qdS)z€Bring the number of pool processes up to the specified number, for use after reaping workers which have exited. r\rZZ PoolWorkerTz added workerN) rŸr•rRÚnameÚreplacer}r~ÚappendrrA) r[rZrˆr rErFrGrHr‰rIrLÚwrrrr¢7sýÿ zPool._repopulate_pool_staticc Cs*t |¡r&t |||||||||| ¡ dS)zEClean up any exited workers and start replacements for them. N)rr¡r¢) r[rZrˆr rErFrGrHr‰rIrrrÚ_maintain_poolJs   ýzPool._maintain_poolcCs4|j ¡|_|j ¡|_|jjj|_|jjj|_ dSr ) rbreryrzr5Úsendr€r>ÚrecvrƒrrrrrcVs   zPool._setup_queuescCs|jtkrtdƒ‚dS)NzPool not running)rar rnrrrrÚ_check_running\s zPool._check_runningcCs| |||¡ ¡S)zT Equivalent of `func(*args, **kwds)`. Pool must be running. )Ú apply_asyncr;)rrMrrNrrrÚapply`sz Pool.applycCs| ||t|¡ ¡S)zx Apply `func` to each element in `iterable`, collecting the results in a list that is returned. )Ú _map_asyncrr;©rrMÚiterableÚ chunksizerrrrgszPool.mapcCs| ||t|¡ ¡S)zÌ Like `map()` method but the elements of the `iterable` are expected to be iterables as well and will be unpacked as arguments. Hence `func` and (a, b) becomes func(a, b). )r­rr;r®rrrrnsz Pool.starmapcCs| ||t|||¡S)z= Asynchronous version of `starmap()` method. )r­r©rrMr¯r°ÚcallbackÚerror_callbackrrrÚ starmap_asyncvs ÿzPool.starmap_asyncc cslz,d}t|ƒD]\}}||||fifVqWn:tyf}z"||dt|fifVWYd}~n d}~00dS)zšProvides a generator of tasks for imap and imap_unordered with appropriate handling for iterables which throw exceptions during iteration.éÿÿÿÿrN)Ú enumeraterBrC)rZ result_jobrMr¯rLÚxrPrrrÚ_guarded_task_generation~s zPool._guarded_task_generationrcCs–| ¡|dkr:t|ƒ}|j | |j||¡|jf¡|S|dkrPtd |¡ƒ‚t   |||¡}t|ƒ}|j | |jt |¡|jf¡dd„|DƒSdS)zP Equivalent of `map()` -- can be MUCH slower than `Pool.map()`. rzChunksize must be 1+, not {0:n}css|]}|D] }|Vq qdSr r©r˜ÚchunkrXrrrÚ ¤ózPool.imap..N) rªÚ IMapIteratorrfr:r¸Ú_jobÚ _set_lengthrnr9rÚ _get_tasksr©rrMr¯r°rOÚ task_batchesrrrÚimap‰s4þÿÿÿþüÿz Pool.imapcCs–| ¡|dkr:t|ƒ}|j | |j||¡|jf¡|S|dkrPtd |¡ƒ‚t   |||¡}t|ƒ}|j | |jt |¡|jf¡dd„|DƒSdS)zL Like `imap()` method but ordering of results is arbitrary. rzChunksize must be 1+, not {0!r}css|]}|D] }|Vq qdSr rr¹rrrr»Àr¼z&Pool.imap_unordered..N) rªÚIMapUnorderedIteratorrfr:r¸r¾r¿rnr9rrÀrrÁrrrÚimap_unordered¦s0þÿÿþüÿzPool.imap_unorderedcCs6| ¡t|||ƒ}|j |jd|||fgdf¡|S)z; Asynchronous version of `apply()` method. rN)rªÚ ApplyResultrfr:r¾)rrMrrNr²r³rOrrrr«Âs zPool.apply_asynccCs| ||t|||¡S)z9 Asynchronous version of `map()` method. )r­rr±rrrÚ map_asyncÌsÿzPool.map_asyncc Csž| ¡t|dƒst|ƒ}|durJtt|ƒt|jƒdƒ\}}|rJ|d7}t|ƒdkrZd}t |||¡}t||t|ƒ||d�} |j   |  | j ||¡df¡| S)zY Helper function to implement map, starmap and their async counterparts. Ú__len__Nérr©r³) rªr<rÚdivmodr•r`rrÀÚ MapResultrfr:r¸r¾) rrMr¯Zmapperr°r²r³ÚextrarÂrOrrrr­Ôs,  ÿþüÿzPool._map_asynccCs"t||d�| ¡s| ¡q dS)N)Útimeout)rÚemptyr;)rŒÚchange_notifierrÎrrrÚ_wait_for_updatesñs zPool._wait_for_updatesc Cstt ¡}|jtks |r\|jtkr\| ||||||| | | | ¡ g| |¡¢| ¢}| ||¡q| d¡t   d¡dS)Nzworker handler exiting) rvÚcurrent_threadrar r r§rœrÑr:rrA)r–ÚcacheÚ taskqueuer[rZrˆr rErFrGrHr‰rIrŒrÐÚthreadZcurrent_sentinelsrrrrx÷sþ zPool._handle_workersc Cs�t ¡}t|jdƒD�] \}}d}zî|D]Š}|jtkrDt d¡qîz ||ƒWq(ty°} zH|dd…\} } z||   | d| f¡Wnt yšYn0WYd} ~ q(d} ~ 00q(|rÞt d¡|rÎ|dnd} || dƒWd}}} qWd}}} �q,Wd}}} qd}}} 0qt d¡z6t d¡|  d¡t d ¡|D]} |dƒ�qPWnt �y€t d ¡Yn0t d ¡dS) Nz'task handler found thread._state != RUNéFzdoing set_length()rrµztask handler got sentinelz/task handler sending sentinel to result handlerz(task handler sending sentinel to workersz/task handler got OSError when sending sentinelsztask handler exiting) rvrÒÚiterr;rar rrArBÚ_setÚKeyErrorr:r@) rÔr:rFr rÓrÕZtaskseqZ set_lengthrJrPrKÚidxr‹rrrr sJ       ý þ    zPool._handle_tasksc Cs¾t ¡}z |ƒ}Wn"ttfy4t d¡YdS0|jtkr^|jtksRJdƒ‚t d¡q²|durrt d¡q²|\}}}z||  ||¡Wnt y¢Yn0d}}}q|�rJ|jtk�rJz |ƒ}Wn"ttfyðt d¡YdS0|du�rt d¡q²|\}}}z||  ||¡Wnt �y:Yn0d}}}q²t |dƒ�r¦t d¡z,t dƒD]}|j  ¡�s€�qŠ|ƒ�qjWnttf�y¤Yn0t d t|ƒ|j¡dS) Nz.result handler got EOFError/OSError -- exitingzThread not in TERMINATEz,result handler found thread._state=TERMINATEzresult handler got sentinelz&result handler ignoring extra sentinelr>z"ensuring that outqueue is not fullé z7result handler exiting: len(cache)=%s, thread._state=%s)rvrÒr@r?rrArar r rØrÙr<rŸr>Úpollr•)rFr;rÓrÕrJrKrLÚobjrrrr‚:s\                 ÿzPool._handle_resultsccs0t|ƒ}tt ||¡ƒ}|s dS||fVqdSr )r×ÚtuplerÚislice)rMÚitÚsizer·rrrrÀvs zPool._get_taskscCs tdƒ‚dS)Nz:pool objects cannot be passed between processes or pickled)ÚNotImplementedErrorrrrrr*sÿzPool.__reduce__cCs2t d¡|jtkr.t|_t|j_|j d¡dS)Nz closing pool)rrArar r r|rgr:rrrrr=„s   z Pool.closecCst d¡t|_| ¡dS)Nzterminating pool)rrAr rar‡rrrrrt‹s zPool.terminatecCsjt d¡|jtkrtdƒ‚n|jttfvr4tdƒ‚|j ¡|j  ¡|j  ¡|j D] }| ¡qXdS)Nz joining poolzPool is still runningzIn unknown state) rrArar rnr r r|r'r�r„r`)rr‹rrrr'�s       z Pool.joincCs@t d¡|j ¡| ¡r<|j ¡r<|j ¡t  d¡qdS)Nz7removing tasks from inqueue until task handler finishedr) rrAÚ_rlockÚacquireÚis_aliver>rÜr©ÚtimeÚsleep)rEÚ task_handlerrárrrÚ_help_stuff_finishœs    zPool._help_stuff_finishc CsXt d¡t|_| d¡t|_t d¡| ||t|ƒ¡| ¡sXt| ƒdkrXtdƒ‚t|_| d¡| d¡t d¡t   ¡|ur�|  ¡|rÈt |ddƒrÈt d¡|D]} | j dur°|  ¡q°t d¡t   ¡|uræ|  ¡t d ¡t   ¡|u�r|  ¡|�rTt |ddƒ�rTt d ¡|D](} |  ¡�r*t d | j¡|   ¡�q*dS) Nzfinalizing poolz&helping task handler/workers to finishrz.Cannot have cache with result_hander not alivezjoining worker handlerrtzterminating workerszjoining task handlerzjoining result handlerzjoining pool workersr�)rrAr rar:rér•rår8rvrÒr'r<rsrtÚpid) r–rÔrErFr rÐZworker_handlerrèZresult_handlerrÓr‹rrrr†¥sB   ÿ            zPool._terminate_poolcCs | ¡|Sr )rªrrrrÚ __enter__ÛszPool.__enter__cCs | ¡dSr )rt)rÚexc_typeÚexc_valÚexc_tbrrrÚ__exit__ßsz Pool.__exit__)NNrNN)N)N)NNN)r)r)NNN)NNN)N)-rr r!r3r{Ú staticmethodrZrÚwarningsÚwarnr r‘r2rurœr¡rrr¢r§rcrªr¬rrr´r¸rÃrÅr«rÇr­rÑÚ classmethodrxrr‚rÀr*r=rtr'rér†rërïrrrrr­sv ÿ P       ÿ   ÿ ÿ ÿ    - ;    5c@sJeZdZdd„Zdd„Zdd„Zddd „Zdd d „Zd d „Ze e j ƒZ dS)rÆcCs>||_t ¡|_ttƒ|_|j|_||_||_ ||j|j<dSr ) r`rvÚEventÚ_eventÚnextÚ job_counterr¾rhÚ _callbackÚ_error_callback)rr r²r³rrrrès  zApplyResult.__init__cCs |j ¡Sr )rõÚis_setrrrrÚreadyñszApplyResult.readycCs| ¡std |¡ƒ‚|jS)Nz{0!r} not ready)rûrnr9Ú_successrrrrÚ successfulôszApplyResult.successfulNcCs|j |¡dSr )rõr©rrÎrrrrùszApplyResult.waitcCs,| |¡| ¡st‚|jr"|jS|j‚dSr )rrûrrüÚ_valuerþrrrr;üs  zApplyResult.getcCsZ|\|_|_|jr$|jr$| |j¡|jr<|js<| |j¡|j ¡|j|j=d|_dSr ) rürÿrørùrõÚsetrhr¾r`©rrLrÝrrrrØs       zApplyResult._set)N)N) rr r!rrûrýrr;rØróÚtypesÚ GenericAliasÚ__class_getitem__rrrrrÆæs    rÆc@seZdZdd„Zdd„ZdS)rÌcCshtj||||d�d|_dg||_||_|dkrNd|_|j ¡|j|j =n||t ||ƒ|_dS)NrÊTr) rÆrrürÿÚ _chunksizeÚ _number_leftrõrrhr¾Úbool)rr r°Úlengthr²r³rrrrs ÿ   zMapResult.__init__cCsÆ|jd8_|\}}|rv|jrv||j||j|d|j…<|jdkrÂ|jrZ| |j¡|j|j=|j ¡d|_ nL|sŒ|jrŒd|_||_|jdkrÂ|j r¨|  |j¡|j|j=|j ¡d|_ dS)NrrF) rrürÿrrørhr¾rõrr`rù)rrLZsuccess_resultÚsuccessrOrrrrØ&s&          zMapResult._setN)rr r!rrØrrrrrÌs rÌc@s:eZdZdd„Zdd„Zd dd„ZeZdd „Zd d „ZdS) r½cCsT||_t t ¡¡|_ttƒ|_|j|_t   ¡|_ d|_ d|_ i|_||j|j<dS)Nr)r`rvÚ ConditionÚLockÚ_condrör÷r¾rhÚ collectionsÚdequeÚ_itemsÚ_indexÚ_lengthÚ _unsorted)rr rrrrDs  zIMapIterator.__init__cCs|Sr rrrrrÚ__iter__OszIMapIterator.__iter__Nc CsÄ|j�–z|j ¡}WnvtyŒ|j|jkrrrrrru§szThreadPool._get_sentinelscCsgSr rršrrrrœªsz ThreadPool._get_worker_sentinelscCsDz|jdd�qWntjy&Yn0t|ƒD]}| d¡q0dS)NF)Úblock)r;rdÚEmptyrŸr:)rErèrárLrrrré®s  zThreadPool._help_stuff_finishcCst |¡dSr )rærç)rrŒrÐrÎrrrrѹszThreadPool._wait_for_updates)NNr) rr r!r{rðrZrrcrurœrérÑrrrrr–s    )NrNF))Ú__all__r rrlrdrvrær$rrñr#rrrÚ connectionrr r r r Úcountr÷rrrBrr"r)r,rRrCÚdictrTÚobjectrrÆZ AsyncResultrÌr½rÄrrrrrÚ sN   ÿ -=++E