tzh
2024-08-22 c7d0944258c7d0943aa7b2211498fd612971ce27
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
]\¬Qc@sTdgZddlZddlZddlZddlZddlZddlmZmZm    Z    ddl
m Z m Z dZ dZdZejƒZd„Zd    efd
„ƒYZefed „Zdefd „ƒYZd efd„ƒYZeZdefd„ƒYZdefd„ƒYZdefd„ƒYZdefd„ƒYZdS(tPooliÿÿÿÿN(tProcesst    cpu_countt TimeoutError(tFinalizetdebugiiicCs
t|ŒS(N(tmap(targs((s\/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/multiprocessing/pool.pytmapstar@stMaybeEncodingErrorcBs)eZdZd„Zd„Zd„ZRS(sVWraps possible unpickleable errors, so they can be
    safely sent through the socket.cCsAt|ƒ|_t|ƒ|_tt|ƒj|j|jƒdS(N(treprtexctvaluetsuperR    t__init__(tselfR R ((s\/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/multiprocessing/pool.pyRKscCsd|j|jfS(Ns(Error sending result: '%s'. Reason: '%s'(R R (R((s\/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/multiprocessing/pool.pyt__str__Ps    cCsdt|ƒS(Ns<MaybeEncodingError: %s>(tstr(R((s\/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/multiprocessing/pool.pyt__repr__Ts(t__name__t
__module__t__doc__RRR(((s\/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/multiprocessing/pool.pyR    Gs        c
CsÑ|dks0t|ƒtkr*|dks0t‚|j}|j}t|dƒrn|jjƒ|j    jƒn|dk    r‡||Œnd}x/|dks®|r¾||kr¾y |ƒ}Wn"t
t fk
rßt dƒPnX|dkrút dƒPn|\}    }
} } } yt | | | Žf}Wntk
rI}t|f}nXy||    |
|fƒWnMtk
r°}t||dƒ}t d|ƒ||    |
t|ffƒnX|d7}qWt d|ƒdS(Nit_writers)worker got EOFError or IOError -- exitingsworker got sentinel -- exitingis0Possible encoding error while sending result: %ssworker exiting after %d tasks(tNonettypetinttAssertionErrortputtgetthasattrRtcloset_readertEOFErrortIOErrorRtTruet    ExceptiontFalseR    (tinqueuetoutqueuet initializertinitargstmaxtasksRRt    completedttasktjobtitfuncRtkwdstresulttetwrapped((s\/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/multiprocessing/pool.pytworkerXs@0           ! 
 
cBseZdZeZddddd„Zd„Zd„Zd„Zd„Z    did„Z
dd„Z dd    „Z dd
„Z didd „Zddd „Zed „ƒZed„ƒZed„ƒZed„ƒZd„Zd„Zd„Zd„Zed„ƒZed„ƒZRS(sH
    Class which supports an async version of the `apply()` builtin
    c Cs)|jƒtjƒ|_i|_t|_||_||_||_|dkr|y t
ƒ}Wq|t k
rxd}q|Xn|dkr—t dƒ‚n|dk    rÂt |dƒ rÂtdƒ‚n||_g|_|jƒtjdtjd|fƒ|_t|j_t|j_|jjƒtjdtjd|j|j|j|jfƒ|_t|j_t|j_|jjƒtjdtjd|j|j|jfƒ|_ t|j _t|j _|j jƒt!||j"d|j|j#|j|j|j|j|j |jfddƒ|_$dS(    Nis&Number of processes must be at least 1t__call__sinitializer must be a callablettargetRt exitpriorityi(%t _setup_queuestQueuet
_taskqueuet_cachetRUNt_statet_maxtasksperchildt _initializert    _initargsRRtNotImplementedErrort
ValueErrorRt    TypeErrort
_processest_poolt_repopulate_poolt    threadingtThreadRt_handle_workerst_worker_handlerR"tdaemontstartt _handle_taskst
_quick_putt    _outqueuet _task_handlert_handle_resultst
_quick_gett_result_handlerRt_terminate_poolt_inqueuet
_terminate(Rt    processesR'R(tmaxtasksperchild((s\/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/multiprocessing/pool.pyRˆsV
                                 
                   $                cCswt}xjttt|jƒƒƒD]M}|j|}|jdk    r"td|ƒ|jƒt    }|j|=q"q"W|S(sCleanup after any worker processes which have exited due to reaching
        their specified lifetime.  Returns True if any workers were cleaned up.
        scleaning up worker %dN(
R$treversedtrangetlenRDtexitcodeRRtjoinR"(RtcleanedR-R3((s\/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/multiprocessing/pool.pyt_join_exited_workersÂs" 
c
Cs¦xŸt|jt|jƒƒD]}|jdtd|j|j|j|j    |j
fƒ}|jj |ƒ|j j ddƒ|_ t|_|jƒtdƒqWdS(s€Bring the number of pool processes up to the specified number,
        for use after reaping workers which have exited.
        R5RRt
PoolWorkers added workerN(RYRCRZRDRR3RTRNR>R?R=tappendtnametreplaceR"RJRKR(RR-tw((s\/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/multiprocessing/pool.pyREÑs#     
cCs|jƒr|jƒndS(sEClean up any exited workers and start replacements for them.
        N(R^RE(R((s\/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/multiprocessing/pool.pyt_maintain_poolás cCsPddlm}|ƒ|_|ƒ|_|jjj|_|jjj|_    dS(Ni(t SimpleQueue(
tqueuesReRTRNRtsendRMRtrecvRQ(RRe((s\/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/multiprocessing/pool.pyR7çs
  cCs.|jtkst‚|j|||ƒjƒS(s1
        Equivalent of `apply()` builtin
        (R<R;Rt apply_asyncR(RR.RR/((s\/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/multiprocessing/pool.pytapplyîscCs.|jtkst‚|j|||ƒjƒS(s/
        Equivalent of `map()` builtin
        (R<R;Rt    map_asyncR(RR.titerablet    chunksize((s\/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/multiprocessing/pool.pyRõsicsÝ|jtkst‚|dkrft|jƒ‰|jj‡‡fd†t|ƒDƒˆjfƒˆS|dksxt‚t    j
ˆ||ƒ}t|jƒ‰|jj‡fd†t|ƒDƒˆjfƒd„ˆDƒSdS(sZ
        Equivalent of `itertools.imap()` -- can be MUCH slower than `Pool.map()`
        ic3s0|]&\}}ˆj|ˆ|fifVqdS(N(t_job(t.0R-tx(R.R0(s\/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/multiprocessing/pool.pys    <genexpr>sc3s0|]&\}}ˆj|t|fifVqdS(N(RnR(RoR-Rp(R0(s\/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/multiprocessing/pool.pys    <genexpr>
scss"|]}|D] }|Vq qdS(N((Rotchunktitem((s\/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/multiprocessing/pool.pys    <genexpr> sN( R<R;Rt IMapIteratorR:R9Rt    enumeratet _set_lengthRt
_get_tasks(RR.RlRmt task_batches((R.R0s\/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/multiprocessing/pool.pytimapüs csÝ|jtkst‚|dkrft|jƒ‰|jj‡‡fd†t|ƒDƒˆjfƒˆS|dksxt‚t    j
ˆ||ƒ}t|jƒ‰|jj‡fd†t|ƒDƒˆjfƒd„ˆDƒSdS(sK
        Like `imap()` method but ordering of results is arbitrary
        ic3s0|]&\}}ˆj|ˆ|fifVqdS(N(Rn(RoR-Rp(R.R0(s\/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/multiprocessing/pool.pys    <genexpr>sc3s0|]&\}}ˆj|t|fifVqdS(N(RnR(RoR-Rp(R0(s\/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/multiprocessing/pool.pys    <genexpr>scss"|]}|D] }|Vq qdS(N((RoRqRr((s\/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/multiprocessing/pool.pys    <genexpr>sN( R<R;RtIMapUnorderedIteratorR:R9RRtRuRRv(RR.RlRmRw((R.R0s\/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/multiprocessing/pool.pytimap_unordereds cCsV|jtkst‚t|j|ƒ}|jj|jd|||fgdfƒ|S(s>
        Asynchronous equivalent of `apply()` builtin
        N(    R<R;Rt ApplyResultR:R9RRnR(RR.RR/tcallbackR0((s\/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/multiprocessing/pool.pyRi s+csû|jtkst‚t|dƒs3t|ƒ}n|dkr}tt|ƒt|jƒdƒ\}}|r}|d7}q}nt|ƒdkr˜d}nt    j
|||ƒ}t |j |t|ƒ|ƒ‰|j j‡fd†t|ƒDƒdfƒˆS(s<
        Asynchronous equivalent of `map()` builtin
        t__len__iiic3s0|]&\}}ˆj|t|fifVqdS(N(RnR(RoR-Rp(R0(s\/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/multiprocessing/pool.pys    <genexpr>:sN(R<R;RRtlistRtdivmodRZRDRRvt    MapResultR:R9RRt(RR.RlRmR|textraRw((R0s\/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/multiprocessing/pool.pyRk)s (    cCsotjƒ}xB|jtks6|jrP|jtkrP|jƒtjdƒqW|j    j
dƒt dƒdS(Ngš™™™™™¹?sworker handler exiting( RFtcurrent_threadR<R;R:t    TERMINATERdttimetsleepR9RRR(tpooltthread((s\/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/multiprocessing/pool.pyRH>s  *
c
Cs1tjƒ}x¶t|jdƒD]˜\}}d}x‚t|ƒD]P\}}|jratdƒPny||ƒWq>tk
rtdƒPq>Xq>W|rtdƒ||dƒqqPqWtdƒy@tdƒ|j    dƒtdƒx|D]}    |dƒqðWWntk
r"td    ƒnXtd
ƒdS( Niÿÿÿÿs'task handler found thread._state != RUNscould not put task on queuesdoing set_length()istask handler got sentinels/task handler sending sentinel to result handlers(task handler sending sentinel to workerss/task handler got IOError when sending sentinelsstask handler exiting(
RFR‚titerRRRtR<RR!R(
t    taskqueueRR&R†R‡ttaskseqt
set_lengthR-R+tp((s\/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/multiprocessing/pool.pyRLKs6     
 
    
 
 
 
  cCsòtjƒ}x¶y |ƒ}Wn"ttfk
r@tdƒdSX|jrm|jtks_t‚tdƒPn|dkr‡tdƒPn|\}}}y||j    ||ƒWqt
k
rÁqXqx¢|ri|jtkriy |ƒ}Wn"ttfk
rtdƒdSX|dkr+tdƒqÈn|\}}}y||j    ||ƒWqÈt
k
reqÈXqÈWt |dƒrÕtdƒy5x.t dƒD] }|j jƒs¬Pn|ƒq“WWqÕttfk
rÑqÕXntdt|ƒ|jƒdS(    Ns.result handler got EOFError/IOError -- exitings,result handler found thread._state=TERMINATEsresult handler got sentinels&result handler ignoring extra sentinelRs"ensuring that outqueue is not fulli
s7result handler exiting: len(cache)=%s, thread._state=%s(RFR‚R!R RR<RƒRRt_settKeyErrorRRYRtpollRZ(R&RtcacheR‡R+R,R-tobj((s\/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/multiprocessing/pool.pyRPrsX  
    
 
 
 
 
ccsCt|ƒ}x0ttj||ƒƒ}|s1dS||fVqdS(N(Rˆttuplet    itertoolstislice(R.tittsizeRp((s\/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/multiprocessing/pool.pyRv¬s  cCstdƒ‚dS(Ns:pool objects cannot be passed between processes or pickled(R@(R((s\/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/multiprocessing/pool.pyt
__reduce__µscCs5tdƒ|jtkr1t|_t|j_ndS(Ns closing pool(RR<R;tCLOSERI(R((s\/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/multiprocessing/pool.pyRºs
    cCs-tdƒt|_t|j_|jƒdS(Nsterminating pool(RRƒR<RIRU(R((s\/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/multiprocessing/pool.pyt    terminateÀs
     cCsntdƒ|jttfks%t‚|jjƒ|jjƒ|jjƒx|j    D]}|jƒqVWdS(Ns joining pool(
RR<R˜RƒRRIR\RORRRD(RRŒ((s\/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/multiprocessing/pool.pyR\Æs
   cCsWtdƒ|jjƒx9|jƒrR|jjƒrR|jjƒtjdƒqWdS(Ns7removing tasks from inqueue until task handler finishedi(    Rt_rlocktacquiretis_aliveRRRhR„R…(R%t task_handlerR–((s\/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/multiprocessing/pool.pyt_help_stuff_finishÏs
 
  c    
Csµtdƒt|_t|_tdƒ|j||t|ƒƒ|jƒsct|ƒdksct‚t|_|jdƒtdƒt    j
ƒ|k    r¥|j dƒn|røt |ddƒrøtdƒx-|D]"}    |    j dkrÏ|    jƒqÏqÏWntdƒt    j
ƒ|k    r$|j dƒntd    ƒt    j
ƒ|k    rP|j dƒn|r±t |ddƒr±td
ƒx;|D]0}    |    jƒrztd |    jƒ|    j ƒqzqzWndS( Nsfinalizing pools&helping task handler/workers to finishisjoining worker handlerg}Ô%­I²TR™sterminating workerssjoining task handlersjoining result handlersjoining pool workersscleaning up worker %d(RRƒR<RžRZRœRRRRFR‚R\RR[R™tpid(
tclsR‰R%R&R†tworker_handlerRtresult_handlerRRŒ((s\/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/multiprocessing/pool.pyRSØs8
        
$     
 
 
 
 
  N((((RRRRRRR^RERdR7RjRRxRzRiRkt staticmethodRHRLRPRvR—RR™R\Ržt classmethodRS(((s\/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/multiprocessing/pool.pyR‚s0     9                        ':                            R{cBsDeZd„Zd„Zd„Zdd„Zdd„Zd„ZRS(cCsStjtjƒƒ|_tjƒ|_||_t|_    ||_
|||j<dS(N( RFt    ConditiontLockt_condt job_countertnextRnR:R$t_readyt    _callback(RRR|((s\/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/multiprocessing/pool.pyR s             cCs|jS(N(Rª(R((s\/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/multiprocessing/pool.pytreadyscCs|jst‚|jS(N(RªRt_success(R((s\/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/multiprocessing/pool.pyt
successfulscCsB|jjƒz |js,|jj|ƒnWd|jjƒXdS(N(R§R›Rªtwaittrelease(Rttimeout((s\/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/multiprocessing/pool.pyR¯s
     cCs<|j|ƒ|jst‚n|jr/|jS|j‚dS(N(R¯RªRR­t_value(RR±((s\/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/multiprocessing/pool.pyR#s              cCs€|\|_|_|jr7|jr7|j|jƒn|jjƒzt|_|jjƒWd|jjƒX|j    |j
=dS(N( R­R²R«R§R›R"RªtnotifyR°R:Rn(RR-R‘((s\/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/multiprocessing/pool.pyR,s     N(    RRRR¬R®RR¯RR(((s\/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/multiprocessing/pool.pyR{
s                  R€cBseZd„Zd„ZRS(cCstj|||ƒt|_dg||_||_|dkr`d|_t|_||j    =n||t
||ƒ|_dS(Ni( R{RR"R­RR²t
_chunksizet _number_leftRªRntbool(RRRmtlengthR|((s\/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/multiprocessing/pool.pyR@s                  cCs|\}}|r¹||j||j|d|j+|jd8_|jdkr|jrn|j|jƒn|j|j=|jjƒzt|_    |jj
ƒWd|jj ƒXqnWt |_ ||_|j|j=|jjƒzt|_    |jj
ƒWd|jj ƒXdS(Nii(R²R´RµR«R:RnR§R›R"RªR³R°R$R­(RR-tsuccess_resulttsuccessR0((s\/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/multiprocessing/pool.pyRLs* "                        (RRRR(((s\/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/multiprocessing/pool.pyR€>s     RscBs>eZd„Zd„Zdd„ZeZd„Zd„ZRS(cCsktjtjƒƒ|_tjƒ|_||_tj    ƒ|_
d|_ d|_ i|_|||j<dS(Ni(RFR¥R¦R§R¨R©RnR:t collectionstdequet_itemst_indexRt_lengtht    _unsorted(RR((s\/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/multiprocessing/pool.pyRms                cCs|S(N((R((s\/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/multiprocessing/pool.pyt__iter__wscCsÜ|jjƒzžy|jjƒ}Wn„tk
r©|j|jkrNt‚n|jj|ƒy|jjƒ}Wqªtk
r¥|j|jkrœt‚nt    ‚qªXnXWd|jj
ƒX|\}}|rÒ|S|‚dS(N( R§R›R¼tpopleftt
IndexErrorR½R¾t StopIterationR¯RR°(RR±RrR¹R ((s\/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/multiprocessing/pool.pyR©zs&            cCsà|jjƒz¾|j|kr›|jj|ƒ|jd7_xJ|j|jkrŠ|jj|jƒ}|jj|ƒ|jd7_qAW|jjƒn ||j|<|j|jkrÊ|j    |j
=nWd|jj ƒXdS(Ni( R§R›R½R¼R`R¿tpopR³R¾R:RnR°(RR-R‘((s\/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/multiprocessing/pool.pyR“s  cCs^|jjƒz<||_|j|jkrH|jjƒ|j|j=nWd|jjƒXdS(N(R§R›R¾R½R³R:RnR°(RR·((s\/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/multiprocessing/pool.pyRu¦s      N(    RRRRÀRR©t__next__RRu(((s\/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/multiprocessing/pool.pyRsks     
        RycBseZd„ZRS(cCst|jjƒzR|jj|ƒ|jd7_|jjƒ|j|jkr^|j|j=nWd|jj    ƒXdS(Ni(
R§R›R¼R`R½R³R¾R:RnR°(RR-R‘((s\/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/multiprocessing/pool.pyR¶s  (RRR(((s\/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/multiprocessing/pool.pyRy´st
ThreadPoolcBsBeZddlmZdddd„Zd„Zed„ƒZRS(i(RcCstj||||ƒdS(N(RR(RRVR'R(((s\/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/multiprocessing/pool.pyRÉscCs@tjƒ|_tjƒ|_|jj|_|jj|_dS(N(R8RTRNRRMRRQ(R((s\/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/multiprocessing/pool.pyR7ÌscCsW|jjƒz5|jjƒ|jjdg|ƒ|jjƒWd|jjƒXdS(N(t    not_emptyR›tqueuetcleartextendRt
notify_allR°(R%RR–((s\/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/multiprocessing/pool.pyRžÒs   N((    RRtdummyRRRR7R£Rž(((s\/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/multiprocessing/pool.pyRÆÅs    (t__all__RFR8R“RºR„tmultiprocessingRRRtmultiprocessing.utilRRR;R˜RƒtcountR¨RR#R    RR3tobjectRR{t AsyncResultR€RsRyRÆ(((s\/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/multiprocessing/pool.pyt<module>#s,              *ÿ‰.-I