ÿØÿà JFIF    ÿÛ „ !.%+&8&+/1555$;@;4?.451 4,$,44444444444414444444444444444444444444444444444444ÿÀ  á á" ÿÄ     ÿÄ ?    !1AQaq"2‘¡±ÁðBRbrÑá#‚’¢²3S CñÿÄ   ÿÄ !    !1QAa‘2ÿÚ   ? 5˜Z¯V¦cø)›t/? z¨±>Õ5€¶‹Á¤·¼z¼Ü¬+ñ®v¤¨_ˆR­BFn©—˜ý®ç̝P8gýt·ÉSTŦˆìät?þé¼íìN/Þa)ì–í6ô… Ï¿øÃj´¿KÇü]ÿ ªô¹-eKànëÕHTx}ýSÜ›ÿ ”7Ø×&µ<¦  ¥ÑO¶[Ù¯ä¨ÞÃÿ PZ-¬;#õ|•oaÿ ©CìÞz3˜öː/¤­ñTûIØ}š^ mÓ%ªxˆ¥ÉŸu=Z+ISe¿45™¼u;ú&WØ÷€æßQ™®{|íx*TC“#ZŠìZ§²‹ 6pv…³¿¡äª*áZÐ%ÒOáˆo"x«OHk w±æ+¬V(kMúŸ5Vö«$ ÁrÏbàb57/luR ¸ÑÛj Òµì`Мq­û žICÀÊ•©4€Âcà¨Ï€O´<èÐ:›ù(Ë^L8þ‘ÍÌ#¸Ð_Ì©ÙK(Öz 4¬û+¸;ü’V’84‘¬ÃŽ:[â‡ÔÌáõp¢~§ªlæ£ö{®G>J¼"°‡7¯ÆÉèßû ‹É‹§ÁòÃýâßî ^ƾÙõ‹×óH#«LP½ïX=xÑÍ$|W?•~• îëÔ©ª‹ {ÝT…Kÿ ”hûâá)J*ö˜–ÔU;iÇ€/ ÆþjóZ\ýwØ=Ìm ºèËL9 ýèÆð/¨’¥öo=nË.%Îì ŽÕ¯È|{Oj²ƒE6e/ßdÄõ²Ìâ1O®ò×TsəԸhOMýíMˆ¿¼H˜l²,7Â¥#MF/Úf°Ö½± ¸–dr‹NýÊ íjqx{œÉ ä-È ¦ øÄër¨q°ð †nцýÑÄÆ’mä…n<0È™;ÁÝá¯ÁZƒ7FÀmì­ É&9ˆîéi¶ùN§Y• ÃZãAâ?•‡©‰ , ó¾IŸŠc1 4â&y­&pŠ­6;M À 0¹qç»p.á …ŸÅáK@%6·y6ƒ‰3?”úºŽ‰éX5ªPT §µ!=Mž«Ú½‹ÅgÂSâÉaþÓoö–¯ÁÔìR>5éÿ üs¶ÆUcÌ kÇR ]ÿ ù¬¼«VŽ;Â|‡~¢¦”ÏŰæ {L™Õ°Óv¹ò¸írޡעCÃ!íVÕ {¶»sŒNPg/ "uÕbkm²“$ďå¿é¹§°½æz¯6 †s¿!s–wÚÝ“™Œ °.ûj>·+™Òa…©Œ&rÝÎtÛë긪Ît’LAVp%c Úý[ÄzJ¾ÇàXXç@˜ó<êL]·T˜¾¥1Ó©V‡g´æ½¦Ý@¹óø!_@´ÞâSÁ —S3™•& ]@JHÚý©ZŽ €×æÔr»Áf!‡yÞ4Mv*èÓã_{‘åóUuљØ«Oïé*®EvÑ Œ÷‡U \"㪒ÍK+À 4“M¡ï:0¥5í!'<@î´”>Ç»&Z–ïCCV˜Ì5Šo&îhè.žû |ÓK©h$s6KìŒëã)¹hI¦GïOåóI;ììü#É$Š0…Ææ¥TØ.5­¾gn´ “ÂÖ\:hœ89G)J@„}œ:’Ò{/Š"¦_Æ×7Æ3VÇŠÊa]ÚŒÙ€Ä–=®uÁßâACZƒ§§£ Qnâ:«,×{tyø¬iÛcœÜÄ€H½ÄÍCk´÷šß .W'b¤Íåh]÷€=,Žv×cÚEÚHXJX¶îo¨FÒtèöŸ>ªª6[J®Fµ£sGÁeqõfe\íjÒÐïÄÐGˆe1Ø‹.Ø”‘Ëuø Y­ˆÜ ŽG|zùªüMpDnQWÄ”%JŠ™)â*p@Örš«ÕT2Ð%ˆG#ª„ ·¤!°ŸOTÂT¸aÚ%4&h™LµšØüÐ.F¿²ÐÞ_Ç‚¾ÅÃaÜ÷09Æ q€öy˜v‡85õN÷]¬äѼóS{°_MެúÔ#°Ç¸0åÞè2ëôPcvÆw9®ií1Ä8F™˜à‰´+‰Ik1òÝ7“Ñ×ÒsÝ\x‚h`ÞÑ`ó"|µEcý£n˜h`}GÞ !±ù²Ápü²ß6 0ïi󜵩SÈÇ7˜-ÕURO˜¦´f$ªž-Í6(œ}<„ éc øs]ŽŽ„*—¾ ìdŽ„)méª\¿êÎIg¾ØÞ~I#C/¼¼´EÁÈŽi8“©õådô·>euä ƒ'Ê×लR1ÉJE1ÐAát`t;ÇР%Ý<‡¥„ÍÆ`×Oyó)õiI€ñQaŸ4Ûù\áàaÃÔ¹HÃu¹*k€¦<„e S‡&õÏ B!ŽhüÞ`yj}mªf×\¿ Ç~æ­9‡û\՞Ǖg²1Žû5V7 !àöšm° c`ܬøÇìµÒ'P"?…´Ö,"§^•õލsÔ)6˜sæéÍR¼ ò|Sl”‹7 nPW Gòú÷½§O¯‡„l¡kSÞŒr½PÊ@æ¢pŽ-mÿ #Ÿ˜Àº¶Áä¦;ïÔæ$1££`“Õ>„—·ž)ßð³ñ#Ï Ô$¶œ‰ÊE‹À;÷º ¯«P:Ñ”8–IÊtpÞ3ª“>ê“þës4ò2OÏÕ­±zô†Õ§‰.÷ä¸;¿˜“'œ›žª}«Œ{ª±Ì 9ÔóÞÕ‡0 $íWV3Üì¬ —@kÝ4@¿r¼±½¬™›?øØæ´'Áé®CË3-g$˜ö‡×auÚi´Žp/êÛ æF›Ú2v‹ã¿¿,nB1̨ƃqÞa5͝@&Æû“él÷ \C²½UÍc ¯k×¢U ÖéQå™—-r wô ÞÏ<Ò=&=ÿ Ôê Òêˈt,i—;LîÜ á¸*ÚÃ1$êL•LÍ <É)ýÐà’ ;F™{ƒ™˜€&'}‚ãÄK`¡ÞT@I;®žZóè‚s’7®°›+§O­Åq©é»²9<Ô J ¼9O’HL»Ùïì¸rk¼Ž_ý‘TŸu[²ßÚŒ·ü÷B%¯E ŸÔX5êO´ Ç•€’I0 ÉJX` ñ¹õ%;µŸD‘«´€àwÒ™U ûئžÖö\×®×´8 ½‡ºÐÆÓ§?Àkmœ=;d5*@-ì0F Rªýš[Ü6âö̃ڸr*KA9· u*µæ£?U¸Âêí†8@¦X4 e-ò„0s{ HâUpU?¼mñRa°®a%Ð'tÉ×’\¾ÊÉ]t›h>·(Ë@R¼¡Ãt h}’O÷au<+nT…Ö…MӐ??Óe95 q>í/;&JSû °¯ÊéÞ øƒ*Ã2½Ài&:nôUl=¾¿5eˆ3”ñc|Ú2V”>„»&eE;«ÚäC p¢Û úy 9š[ŒÌx¼擼A&DåÒ¯ˆ¤ÀÌ;"˜ ÏQä¸åhÊ}Ûq«Û0WžÒ|»€ø®öCm5•\ÇÀ§Pe3£]0ÃàLDÉ‰1øªxjgwT‚÷¿LΨK‹›ùs—xˆÜ±µ kæ¸f‰‰ÜGk/LÛØ6d9ò¶ùA{ƒA3š/¬D¬khÓk‰`˜"㯒r¿±Óã jx‡°e}<Ñø\3y:'À•/h½Í€Ç4~g ?Û(¼]v‘ªlKÎâ~?O‚W%{Ì:“'©úNq¾›úo(X’¥¯ˆ nFê{Ç€ü?º'ë ø‹ì Þ09ŒÌç9Æ —ËC`j@ÓÄ(+a‹un¸#ÂꟋ{K`‘ÑÍÍ'à´»/Û,KW;Þ4²þð ï Nm|~fGÏ(…³Ã)«1ö­Õ ¥‡¨©ƒÃ™ü-s=à=U66Ï«Ýc蓦W¹íž®›nÔ%êÇìŒ<#Ü×84ån®Ð ÒåOC` ñânÑs‡¢ç 1õ%Îhì½Ã½® e:ݼUZo™`  ÅZŸŒÊ«ê1ÏÄo$q¹Þ€©ˆhÐÉä¯ñ[!…Ú˜àJ:x2$Íß&PåT£6ç— ‡Í*4Ýšçjÿ ‰É nófÐ ó(L5C•åÆ\rMÒ@ò }y-W}™üýVù—ú¢=Ù”c®‘< M ž ´Phr ¦©TD ‘ù.$´÷O‡‘V2Æò.=IUŒ=ž‡â¬i™aþÓåÙ?òUø'ØÖ•.~* šTŒ!•-×áºTâ®ä#õü'´ eýlYÅÓeÕKÂrT"CÚ@u!Óxƒ{š3€}1¿(r}%«nËamjÑ%ÑNEò v ˜à  σöK³,*º.àzù¨™Ó ÚçâU¦*¿ 9{%Ö¹ njûdaXöb) kÛÆ±ûÓ\°M7ˆÂ=û›ç¿Ã‚­V»Cg–8ÙêE- j)k$º`Ã-ùEýeBÆÇ]c¡°ñty&Òd0nõ'¡W+ƒ*|–øµFa\GQªEAÔp5\Ǽ·¼Ç8·õ -â§Ú[ ‡ uZeÖ 3}×d'+¹:ð+K†Û®s!Ï$úe€<Û”x)1»a­¡LC]¸µík…ÚàA»AYº{†ªS[¦5HÒ7ù --,ísòDØ€èk ÞÀîÜ ò@â( ËNˆë›4ô½•/¦o‡€Û7 ê•ÆêòðÜy'Án½µ á˜ݦ ndeo…[ì¶Ê,¥R³Ä=À±—–ß;£™´ñSâ*g§”ïaið‘Jå~™ÓÞ ß³Õ¢»8x埒²52>AÊb&-÷\7´éÄù€T˜,w;3{ï˜k…à¹ÄqÀ«œ{€\ ˆ¾[´¨јr &Úé„Ívˆ±8†¿]|¬ņ4I×pÞS1ÈÖz‰#Ìv‡G!YNògñ:màTz¢Ý1ô©^O=~ë|5Bã™ç•¼µõ•bÆ@úÕS¬ÈŒ#¬zünrŸ û” Z²•èðV"ÁHÚý©wÝ €7¼Ìu1hÑa3Éä û f$o¿É ™Ú›ÝçnpÒ3äÌ3†Í§,Äï]$‰/pê †«À¼¸e9­Æê_C]žƒ·ý·frÁN«, E=›Çq -‰öŒ:aÏ¿±í&£Í:-} 84‘ÿ eƒQÑeëSsuiA ³g㟥ú£?ÿ ʼn*”“÷aühe:ÊWa@ÒÞk±eØ] F Ô—r.åä˜ @ö¥ªZoÐýYL·¥S²G/‡ñ <~*ZÆ´è>JlòàÛÆ½ÿ 窘ìGN¢:I®KšJp/`íIÁÀõ#Ä-€ö­šµŒoF4|ÆQØÆ@Ì|£Ô…¢À{9˜è½Üó›€ôYÒÎYsið;ís¤€à²ˆ‚4qÉVŒI$ ‰"° æµ8cXGjœˏ¡Aâý•ËÜ¢ûï e·çLx']á"oÅÎê3¯Ç—¹”ó0nå‚âg{Œñ> S´˜îè°g238‚ãköÝfÚd´6Ò€;ò÷±¢™¼›º ¢Æ'¥Ðx'e¬ç ]bÈÆV¢ó‹kýBO ðÊâ$Ÿ!×T 3Mýמ žìٍàÌü‘8÷€àæØ8æ©6‰©L´«…oãpð„~Çk‰!ñ;‹”ÛžÍ àž±z Ÿôû øŸÝužÏ;ÿ #|u6™Þ¬ÚˆÐõA4¶â|ôl|Ê2ŽÇ¤ÝÅÇY.<#Aí.k§hóF‚”Y; M½Ö4hŸ4&›­¿tès´%FìL¥£Ãk‰ÇT¤haÁ¤ÚxfÉ`ÑìË›>i 3t‚:,–+^÷´–{Û–Nxi"x‘Ûg î¨>¥Õ܁ùZH,2Û“:8xÊ¢Çí9.É-Ìâã-=çjwµS˜dütžçwýGòú®®ûº_ˆýx$–¡ãøO EÚÛÏ÷R„×w+3£Á£öUMyR²¹âŒ°š›¸Ñãò9§Ó_Dl+Ùßc›úšGÅÌc†Ž!Ko=¶.‘Îÿ c²(2®V mª.ÿ ¹B›¹å ù„öŸSV>™ü¯$y:G¢Z×àøúdî¹û­·ýÇ´:•c LÍõi_‹ö+ÎæGÊè>OŠ•äž´§Þ{X}¨1ÚTc›»Qþ•êô°t¿OP?eæ~É{5]•ÙR£r5†nZ\ã@ &îJõ ¾àC°þV>fé¥/ü5ñÊIº_é5 ;e­h<@ Ä&æÃëE%;X,ÒãÆÞ`Oò¦kŸm#˜!ÀyÄ¢| óLšò¥Ä` ¶R=|ÈCâh5ò3DˆïF†ðÒ#ÅìÛœ?¸yhBãœí ZxßÎÄhºRK„`Þödvײ™ÀÈÑÒgŒuY w³%†ƒÓzõ ÖÏp‚dH®¦A´ù§»ÓÇMæ~)ˆð‡û:ù&Ä •vGD´À n ݇¼Ö8Fö óáà£~Ë¥x`oK|Ä?fxiØü%pìR>éò+Û±éÎ>núlFŤ'tq8LZÏvÃ?„¡ß±È⽆¯³íü@x|PöUäèØã¡ð‚ŒAìÏ"vÍwóŸÍ{ ý0.z È•Ö{,N¡£¡ŸKÕÙž>Ýœþ ÍÀ°<×EA!Å‚D™IúOÍ¡>ôG}Â` ÍßkÜL™Ž Þð™ {IøF²¹òQ3&!ÃÂÞz.d&Ï-sH¸,Ôõ˜ŽP€ 77ˆÝ¼ÊëÜw =cÕ Ú,ØÐ5ÎYÐ)ì´öœgŒ[¤ßv㙑8心>h]§µháYš£²ºÑ.{Ï7Sð•?´~×SÃKýJÛ˜ ™Íäiúu<µX¶1õ^kâçIÑ£sZ4h>j*ÔšD:4­¿_ ÷¸ Õxæÿ ¸?Mù _•­ÊÐ ä ÷ý ÑwL œ­ïnTkÛUÍN©ë:¦fV ¶ÜÔÜMªÅâA½–¿R×TXš-%iTÊT•‡Ù‚JôϐZxWÑè‰f‰òG º ×Õû2aZ7OU3[“×AT–ÞŒ…-‘¤”Ì ì&(ˆ¿­•ƒkï’:ðY¦W‘ Å)“†‘˜³Åtcø˜ñTÂwÚÇ4|üLÇªí–v- qˆèU qPE.†â‘˜µ Æ,ÐÅs]8¾„oúÑ i>ÜxxÈó)ƒ ´æÁâØ$À‰vžŸf$Ž |ãw;ÀÁIJ»b` {¦Ó¤Ú$©YÀ‘n@Óïž«9J¼êG m¤ ܯ¹ÌW4€ÐÒÅÛ‡#褕Ÿn-?í|с¥÷Ú¹¬'´ÞÜ9ÓK `hê£SÄSà?7—Wí_´…óB›»:=Ãïq`<8ñÓŒÑlú2d¬ê³£hÖ[l|$vÝro~'R®‰§°ñmY ͧäP |PUª¹·:3Œ[Û{Xÿ ºâ@‚W–Äé u‚ ¯´*=íή.pûÒdt @G‰¬ s¸ ëÉücr ÞæÑ¨Ê@>¤¢Ö±. Þ'¯°ÌME[YéïĵÂCå½ Ué©Áû'Ê9%eÔðNU”ë‘ÌsD3/®+UI˜9h.WC”빓$#:pz:YÓ ¿xž* ³$Í +$kñAŠ‹†¢ Uê>¸)_š¬÷©ßAÂÔb9ÇU ¯¾á•9¯ÏÏ÷O÷¼¼Fähal1‰3Ì[Ïr•´UCksNÐ] R‘¸¥H+§Šé†c©vÖÞ0iÓ76s†î!§=ß ¼~Ô'°Ãmäoäš³ªøi1úÉ)³yV8 CLÄØÁ‘WYïi€H6ÖÑiámø^ÈY´°Ñ7¥Û*—Ñ©L«Qƒï—Ùrÿ ›£Ð*š¸ˆL©ˆ$ˆ ÷¾D§9È®«qbqC)–ˆïv´çñsÑVT­Ø, <àïºÀO«Jý·õ àfPìð .wFšir´þ’2_Y *Æ€x\« ì€9š@ Ž|F⇥ˆkZ@hÖÄ0t¿-<“‹qµ¾*ZL¤Ú)&BJpÓF5=$„at*Zš$’ÑtdûÝRI1 2މ$€$I$#‰SÞ’Hë¬ï;Á$¡t$’`<(ñÇt)$‡Ð.Êf¢X’Kt=Éé$‚ˆªè¢oÝëòI%Rgcª÷ŠyI%¡‰ÿ !ñ)´õ $¤ Ô’IIGÿÙa 3gp@sddlmZededdlmZddlmZddlZddl Z ddl Z ddl m Z ddl Z ddlZddlZddlZddlZddlZddlZddlmZddlmZdd lmZmZmZmZmZmZmZdd l m!Z!ddl"Z#ddl$Z#ddl#Z%ej&d d d r e'd eddfddZ(e(edZ)e(edZ*e(edZ+e(edZ,e(ee-dZ.e(eddZ/da0ddZ1ddZ2ddZ3ddZ4ddZ5dd Z6dkd!d"Z7Gd#d$d$e8Z9Gd%d&d&Z:d'd(Z;Gd)d*d*ej<Z=Gd+d,d,Z>Gd-d.d.e>Z?Gd/d0d0e>Z@Gd1d2d2e>ZAGd3d4d4e>ZBe=fe?e@eBeAffd5d6ZCGd7d8d8e>ZDGd9d:d:e>ZEeCeDeCeEGd;d<d<ZFGd=d>d>e?eFe=ZGGd?d@d@eFZHeCeHe@eBeAfdAGdBdCdCZIGdDdEdEe?eIe=ZJeCeIe@eBeAfdAGdFdGdGZKeCeKGdHdIdIZLGdJdKdKe?eLe=ZMGdLdMdMeLZNeCeNe@eBeAfdAdldNdOZOdPdQZPdRdSZQdTdUZRdVdWZSGdXdYdYe8ZTGdZd[d[e8ZUGd\d]d]e8ZVGd^d_d_e8ZWGd`dadae8ZXGdbdcdce8ZYGdddedeZZeCeZe@eBeAfdAGdfdgdge=Z[dhdiZ\e]djkre^dS)m)support_multiprocessing)hashlib_helper)assert_python_okN) QueueHandler PicklingError)futures)PENDINGRUNNING CANCELLEDCANCELLED_AND_NOTIFIEDFINISHEDFutureBrokenExecutor)BrokenProcessPoolT)addressZmemoryz test too slow on ASAN/MSAN buildcCst}||_||_||_|SN)r_state _exception_result)state exceptionresultfr;/opt/python39/lib/python3.9/test/test_concurrent_futures.py create_future)s rrrr*rr uninitializedcCs||Srr)xyrrrmul;sr%cOs||fSrr)argskwargsrrrcapture>sr(cCst|tddS)Nzthis is an exception)timesleep Exception)trrrsleep_and_raiseAs r-cCs t|t|tjdSr)r)r*printsysstdoutflush)r,msgrrrsleep_and_printEs r3cCs|adSrINITIALIZER_STATUS)r#rrrinitJsr6cCstSrr4rrrrget_init_statusNsr7cCsF|dur0td}|t||dd|_tdtddS)Nconcurrent.futuresCRITICALF皙?zerror in initializer) logging getLogger addHandlerrsetLevel propagater)r* ValueError) log_queueloggerrrr init_failQs   rCc@seZdZddZdS)MyObjectcCsdSrrselfrrr my_method\szMyObject.my_methodN)__name__ __module__ __qualname__rGrrrrrD[srDc@seZdZddZddZdS) EventfulGCObjcCs||_dSr)Eventevent)rFmgrrrr__init__aszEventfulGCObj.__init__cCs|jdSr)rMsetrErrr__del__dszEventfulGCObj.__del__N)rHrIrJrOrQrrrrrK`srKcCstSr)rD)_rrrmake_dummy_objecthsrSc@seZdZddZddZdS) BaseTestCasecCst|_dSr)rthreading_setup _thread_keyrErrrsetUpmszBaseTestCase.setUpcCsttj|jdSr)r reap_childrenthreading_cleanuprVrErrrtearDownpszBaseTestCase.tearDownN)rHrIrJrWrZrrrrrTlsrTcs8eZdZdZiZfddZfddZddZZS) ExecutorMixincs^tt|_t|dr@|jf|j|d|j |_ n|jfd|ji|j |_ dS)Nctx max_workers mp_contextr_) superrWr) monotonict1hasattr executor_type worker_count get_contextexecutor_kwargsexecutorrE __class__rrrWys    zExecutorMixin.setUpcsT|jjddd|_t|j}tjr8td|dd||ddt dS)NTwaitz%.2fs )endi,z+synchronization issue: test lasted too long) rishutdownr)rbrcrverboser.Z assertLessrarZ)rFZdtrjrrrZszExecutorMixin.tearDowncCs t|jSr)mprgr]rErrrrgszExecutorMixin.get_context) rHrIrJrfrhrWrZrg __classcell__rrrjrr[us   r[c@seZdZejZdS)ThreadPoolMixinN)rHrIrJr ThreadPoolExecutorrerrrrrtsrtcs&eZdZejZdZfddZZS)ProcessPoolForkMixinforkcstjdkr|dtSNwin32zrequire unix systemr/platformZskipTestrargrErjrrrgs  z ProcessPoolForkMixin.get_context rHrIrJr ProcessPoolExecutorrer]rgrsrrrjrrvsrvc@seZdZejZdZdS)ProcessPoolSpawnMixinspawnN)rHrIrJr r}rer]rrrrr~sr~cs&eZdZejZdZfddZZS)ProcessPoolForkserverMixin forkservercstjdkr|dtSrxrzrErjrrrgs  z&ProcessPoolForkserverMixin.get_contextr|rrrjrrsrcCsPdd}|D]>}d||j||jf}t||f|f|i}|t|<q dS)NcSs4|dr|ddS|dr,|ddS|SdS)N)ZMixinZTestsZTest)endswith)namerrr strip_mixins     z*create_executor_tests..strip_mixinz%s%sTest)rHtypeglobals)Zmixinbasesexecutor_mixinsrZexerclsrrrcreate_executor_testssrcs(eZdZdZfddZddZZS)InitializerMixincs dattdd|_tdS)Nr") initialized initializerinitargs)r5dictr6rhrarWrErjrrrWs zInitializerMixin.setUpcs6fddtjD}|D]}|dqdS)Ncsg|]}jtqSr)risubmitr7.0rRrErr sz5InitializerMixin.test_initializer..r)rangerf assertEqualr)rFr rrrErtest_initializers  z!InitializerMixin.test_initializer)rHrIrJrfrWrrsrrrjrrs rcs6eZdZdZfddZddZejddZZ S)FailingInitializerMixinrcsZt|dr4||_|j|_tt|jfd|_nd|_d|_ttd|_t dS)Nr]r)r) rdrgr`QueuerArrCrhrarWrErjrrrWs     zFailingInitializerMixin.setUpc Cs|dz|jt}Wnty.Yn40|t|Wdn1sX0Yt}|jj st|dkr| dt dqj|t|jtWdn1s0YWdn1s0YdS)Nz ValueError: error in initializerr\zexecutor not broken after 5 s.g{Gz?) _assert_loggedrirr7r assertRaisesrr)rb_brokenfailr*)rFfuturercrrrrs   &   z(FailingInitializerMixin.test_initializerc#s|jdurFdVg}z||jqWq~tjyBYq~0n8|dd}dVWdn1sn0Y|j}|t fdd|D|dS)Nr8r9c3s|]}|vVqdSrr)rliner2rr z9FailingInitializerMixin._assert_logged..) rAappend get_nowait getMessagequeueEmptyZ assertLogsoutput assertTrueany)rFr2rcmrrrrs $z&FailingInitializerMixin._assert_logged) rHrIrJrfrWr contextlibcontextmanagerrrsrrrjrrs  rc@s<eZdZddZddZddZddZd d Zd d Zd S)ExecutorShutdownTestcCs$|j|t|jjtdddS)Nrr\)rirpr RuntimeErrorrpowrErrrtest_run_after_shutdowns  z,ExecutorShutdownTest.test_run_after_shutdowncCsDtddj|jjt|ddd\}}}||||ddS)N-caKif 1: from concurrent.futures import {executor_type} from time import sleep from test.test_concurrent_futures import sleep_and_print if __name__ == "__main__": context = '{context}' if context == "": t = {executor_type}(5) else: from multiprocessing import get_context context = get_context(context) t = {executor_type}(5, mp_context=context) t.submit(sleep_and_print, 1.0, "apple") r]recontextapple)rformatrerHgetattr assertFalserstriprFrcouterrrrrtest_interpreter_shutdowns    z.ExecutorShutdownTest.test_interpreter_shutdowncCsJtddj|jjt|ddd\}}}|d|||ddS)Nraif 1: import atexit @atexit.register def run_last(): try: t.submit(id, None) except RuntimeError: print("runtime-error") raise from concurrent.futures import {executor_type} if __name__ == "__main__": context = '{context}' if not context: t = {executor_type}(5) else: from multiprocessing import get_context context = get_context(context) t = {executor_type}(5, mp_context=context) t.submit(id, 42).result() r]rrz)RuntimeError: cannot schedule new futuress runtime-error) rrrerHrassertIndecoderrrrrr&test_submit_after_interpreter_shutdown2s  z;ExecutorShutdownTest.test_submit_after_interpreter_shutdowncs6fddtdD}j|D] }|q$dS)Ncsg|]}jtjdqSr:rirr)r*rrErrrOrz=ExecutorShutdownTest.test_hang_issue12364..2)rrirpr)rFfsrrrErtest_hang_issue12364Ns z)ExecutorShutdownTest.test_hang_issue12364csfddtdD}jjdddd|D}t|ddd|D}|D],}j|d |jd | qTt|d dS) Ncsg|]}jtjdqSrrrrErrrVrz.rT)cancel_futurescSsg|]}|r|qSr cancelledrfutrrrr[rcSsg|]}|s|qSrrrrrrrarz fut._state=rr) rrirpZ assertGreaterlenrdoner assertIsNoner)rFrrZothersrrrErtest_cancel_futuresTsz(ExecutorShutdownTest.test_cancel_futurescCsZ|jtjkrtdtddj|jjt|ddd\}}}| || | ddS)zshutdown(wait=False) doesn't hang at exit with running futures. See https://github.com/python/cpython/issues/83386. z9Hangs, see https://github.com/python/cpython/issues/83386raif True: from concurrent.futures import {executor_type} from test.test_concurrent_futures import sleep_and_print if __name__ == "__main__": if {context!r}: multiprocessing.set_start_method({context!r}) t = {executor_type}(max_workers=3) t.submit(sleep_and_print, 1.0, "apple") t.shutdown(wait=False) r]Nrr) rer r}unittestSkipTestrrrHrrrrrrrrtest_hang_gh83386ks   z&ExecutorShutdownTest.test_hang_gh83386N) rHrIrJrrrrrrrrrrrs rc@sDeZdZddZddZddZddZd d Zd d Zd dZ dS)ThreadPoolShutdownTestcCs|dd}td}tdD]}|j||q|t|jjdtdD] }|qJ|j |jjD] }| qjdS)NcSs |dSracquirelockrrr acquire_lockszCThreadPoolShutdownTest.test_threads_terminate..acquire_lockr) threading Semaphorerrirrr_threadsreleaserpjoin)rFrsemir,rrrtest_threads_terminates      z-ThreadPoolShutdownTest.test_threads_terminatec Csjtjdd6}|}|t|ttddgdWdn1sH0Y|jD] }|qXdS)Nr\r_r r\rrrrrrr) r rurlistmapabsrrr)rFerir,rrrtest_context_manager_shutdowns" z4ThreadPoolShutdownTest.test_context_manager_shutdowncCs<tjdd}|ttdd}|j}~|D] }|q*dS)Nr\rr)r rurrrrrrFriresthreadsr,rrrtest_del_shutdowns  z(ThreadPoolShutdownTest.test_del_shutdowncCsFtjdd}|ttdd}|j}|jdd|D] }|q4dS)Nr\rrFrl)r rurrrrrprrrrrtest_shutdown_no_waits   z,ThreadPoolShutdownTest.test_shutdown_no_waitcCsTtjddd}|ttdd|j}~t|D]}||j d| q4dS)Nr\Z SpecialPool)r_Zthread_name_prefixrz^SpecialPool_[0-4]$ r rurrrrr gc_collect assertRegexrrrFrirr,rrrtest_thread_names_assignedsz1ThreadPoolShutdownTest.test_thread_names_assignedcCsRtjdd}|ttdd|j}~t|D]}||j d| q2dS)Nr\rrzThreadPoolExecutor-\d+_[0-4]$rrrrrtest_thread_names_defaults z0ThreadPoolShutdownTest.test_thread_names_defaultcCs:tddj|jjd\}}}||||ddS)Nra[if True: from concurrent.futures import ThreadPoolExecutor from test.test_concurrent_futures import sleep_and_print if __name__ == "__main__": t = ThreadPoolExecutor() t.submit(sleep_and_print, .1, "apple") t.shutdown(wait=False, cancel_futures=True) )rer)rrrerHrrrrrrrtest_cancel_futures_wait_falses  z5ThreadPoolShutdownTest.test_cancel_futures_wait_falseN) rHrIrJrrrrrrrrrrrrs    rc@s,eZdZddZddZddZddZd S) ProcessPoolShutdownTestcCsdd}|}|jdddkr(|j}nd}|d}tdD]}|j||q>|t|jj |tdD] }| qn|jj }|j | D] }| qdS)NcSs |dSrrrrrrrszFProcessPoolShutdownTest.test_processes_terminate..acquire_lockF allow_nonerwrr)rgget_start_methodrfrrrirrr _processesrrpvaluesr)rFrr`Zexpected_num_processesrrR processesprrrtest_processes_terminates      z0ProcessPoolShutdownTest.test_processes_terminatec Csttjd|d8}|j}|t|ttddgdWdn1sP0Y| D] }| qbdS)Nr\r^rr) r r}rgrrrrrrrr)rFrrrrrrrs" z5ProcessPoolShutdownTest.test_context_manager_shutdowncCsptjd|d}|ttdd}|j}|j}|j}|j}~t | | D] }| qV| dS)Nr\r^r)r r}rgrrr_executor_manager_threadr _call_queuerrrr join_thread)rFrirexecutor_manager_threadr call_queuerrrrrs  z)ProcessPoolShutdownTest.test_del_shutdowncCsltjd|d}|ttdd}|j}|j}|j}|j dd| | D] }| qR| dS)Nr\r^rFrl) r r}rgrrrrrrrprrr)rFrirrr rrrrrrs   z-ProcessPoolShutdownTest.test_shutdown_no_waitN)rHrIrJrrrrrrrrrs r)rc@sLeZdZddZddZddZddZd d Zd d Zd dZ ddZ dS) WaitTestscCsH|jtjd}tj||gtjd\}}||h||t|dSN? return_when) rirr)r*r rm ALL_COMPLETEDrrP)rFrrnot_donerrr test_203696s   zWaitTests.test_20369cCsd|jtdd}|jtjd}tjt||gtjd\}}| t |g|| t t|g|dS)Nrr r ) rirr%r)r*r rmCANCELLED_FUTUREFIRST_COMPLETEDrrP)rFfuture1future2rrrrrtest_first_completed?s zWaitTests.test_first_completedcCsT|jtjd}tjtt|gtjd\}}| t ttg|| t |g|dSr ) rirr)r*r rmCANCELLED_AND_NOTIFIED_FUTURESUCCESSFUL_FUTURErrrPrFrfinishedpendingrrr+test_first_completed_some_already_completedJs  z5WaitTests.test_first_completed_some_already_completedcCsr|jtdd}|jtd}|jtjd}tj|||gtjd\}}| t ||g|| t |g|dS)Nrrr rr ) rirr%r-r)r*r rmFIRST_EXCEPTIONrrP)rFrrZfuture3rrrrrtest_first_exceptionVs zWaitTests.test_first_exceptioncCsl|jtdd}|jtjd}tjttt ||gtj d\}}| t tt |g|| t t|g|dS)Nrrr r ) rirdivmodr)r*r rmrrrrrrPrFrrrrrrr*test_first_exception_some_already_completebs" z4WaitTests.test_first_exception_some_already_completecCsP|jtjd}tjt|gtjd\}}|t tg||t |g|dS)Nrr ) rirr)r*r rmEXCEPTION_FUTURErrrPrrrr'test_first_exception_one_already_failedrs z1WaitTests.test_first_exception_one_already_failedcCsj|jtdd}|jtdd}tjttt||gtj d\}}| t ttt||g|| t |dS)Nrrrr ) rirr r%r rmrrr#rrrPr!rrrtest_all_completed|s( zWaitTests.test_all_completedcCsn|jtdd}|jtjd}tjttt ||gdtj d\}}| t ttt |g|| t |g|dS)Nr\)timeoutr) rirr%r)r*r rmrr#rrrrPr!rrr test_timeouts& zWaitTests.test_timeoutN) rHrIrJrrrrr"r$r%r)rrrrr 5s     r c@seZdZddZdS)ThreadPoolWaitTestsc svtfddt}tdz>fddtdD}tj|tj dWt|n t|0dS)Ncs dSrrlr)rMrr future_funcsz@ThreadPoolWaitTests.test_pending_calls_race..future_funcgư>csh|]}jqSr)rir)rr)r+rFrr rz>ThreadPoolWaitTests.test_pending_calls_race..dr ) rrLr/getswitchintervalsetswitchintervalrrPr rmr)rFZoldswitchintervalrr)rMr+rFrtest_pending_calls_races  z+ThreadPoolWaitTests.test_pending_calls_raceN)rHrIrJr0rrrrr*sr*c@s4eZdZddZddZddZddZd d Zd S) AsCompletedTestscCsV|jtdd}|jtdd}ttttt||g}| tttt||g|dS)Nrrr'r&) rirr%rPr as_completedrr#rr)rFrr completedrrrtest_no_timeouts$z AsCompletedTests.test_no_timeoutcCsp|jtjd}t}z*tjttt |gddD]}| |q.Wntj yTYn0| tttt g|dS)Nrrr() rirr)r*rPr r2rr#radd TimeoutErrorr)rFrZcompleted_futuresrrrrtest_zero_timeouts( z"AsCompletedTests.test_zero_timeoutcCs@|jtjd}ddtt|dD}|t |ddS)NrcSsg|]}|qSrr)rrrrrrsz;AsCompletedTests.test_duplicate_futures..rr) rirr)r*r r2 itertoolsrepeatrr)rFrr3rrrtest_duplicate_futuress z'AsCompletedTests.test_duplicate_futurescCsddtdD}|ttd|ttdd|tjNtj|ddD].}| |t |}~t ||qPWdn1s0Y|dd t|D]@}| |t |}~t |||r|dd qdS) NcSsg|] }tqSr)rrrrrrrzGAsCompletedTests.test_free_reference_yielded_future..rr r!rr5test)rrrr rrr r7r2removeweakrefrefrrr set_result)rF futures_listrwrrrr"test_free_reference_yielded_futures&  ,   z3AsCompletedTests.test_free_reference_yielded_futurecCs`ttttg}|tj"}ttj|ddWdn1s@0Y| t |j ddS)Nrr5z2 (of 4) futures unfinished) rPENDING_FUTURERUNNING_FUTURErrr r7rr2rstrr)rFrBrrrr"test_correct_timeout_exception_msgs 0z3AsCompletedTests.test_correct_timeout_exception_msgN)rHrIrJr4r8r;rDrHrrrrr1s  r1c@sZeZdZddZddZddZddZd d Zd d Ze j d dZ ddZ ddZ dS) ExecutorTestcCs$|jtdd}|d|dS)Nrr<)rirrrrrFrrrr test_submitszExecutorTest.test_submitcCs|jjtddd}|d||jjtdddd}||ddddf|t |jjtdd Wdn1s0Y|t|jjdd Wdn1s0YdS) Nrr<)r$rr)rFfn)r)rNarg)rO)rirr%rrr(r TypeErrorrKrrrtest_submit_keywords . z ExecutorTest.test_submit_keywordc Csx|t|jttdtdttttdtd|t|jjttdtdddttttdtddS)N r chunksize)rrrirrrrErrrtest_map szExecutorTest.test_mapcCsJ|jtgdgd}||d||d|t|jdS)N)rrrr)rrrr\)rr)rirr r__next__rZeroDivisionError)rFrrrrtest_map_exception)szExecutorTest.test_map_exceptioncCsdg}z,|jjtjgdddD]}||qWntjyDYn 0|d|ddg|dS)N)rrr&r\r5zexpected TimeoutError) rirr)r*rr r7rr)rFresultsrrrrtest_map_timeout/s   zExecutorTest.test_map_timeoutcCs(|jtdg|jd|jdS)Nrr)rirrGrfrprErrrtest_shutdown_race_issue12456=sz*ExecutorTest.test_shutdown_race_issue12456csPt}tt|fdd}|j|j~jt j d}| |ddS)NcsSr)rP)objZmy_object_collectedrrKrz7ExecutorTest.test_no_stale_references..r5z-Stale reference not collected within timeout.) rDrrLr?r@rirrGrmr SHORT_TIMEOUTr)rFZ my_objectZmy_object_callbackZ collectedrr]rtest_no_stale_referencesDs z%ExecutorTest.test_no_stale_referencesc CsFdD]<}|td|j|dWdq1s60YqdS)N)rz"max_workers must be greater than 0r)assertRaisesRegexr@re)rFZnumberrrrtest_max_workers_negativeTs z&ExecutorTest.test_max_workers_negativecCs<|jttdD]$}t|}~t||qdS)NrR) rirrSrr?r@rrr)rFr\rCrrrtest_free_reference[s  z ExecutorTest.test_free_referenceN)rHrIrJrLrQrUrXrZr[rZ cpython_onlyr`rcrdrrrrrIs   rIc@sFeZdZddZddZddZddZee e d d d d Z d S)ThreadPoolExecutorTestcsDgfdd}|j|td|jjdd|tddS)zTests verifying issue 11777.cs|dSr)r)nrrrrecord_finishediszRThreadPoolExecutorTest.test_map_submits_without_iteration..record_finishedrRTrlN)rirrrpZassertCountEqual)rFrhrrgr"test_map_submits_without_iterationfs  z9ThreadPoolExecutorTest.test_map_submits_without_iterationcCs0|}tdtpdd}||j|dS)N rr)reminos cpu_countr _max_workers)rFriZexpectedrrrtest_default_workerspsz+ThreadPoolExecutorTest.test_default_workerscCs||d}dd}td}td|jD]}|||q*|t|j|jtd|jD] }| q^|j dddS)NrcSs |dSrrrrrrrwsz.acquire_lockrTrl) rerrrrnrrrrrrp)rFrirrrrrrtest_saturationus   z&ThreadPoolExecutorTest.test_saturationcCs`|}|tdd|tdd|tdd|t|jd|jdd dS) Nrrr&r'rrTrl)rerr%rrrrrprFrirrrtest_idle_thread_reuses z-ThreadPoolExecutorTest.test_idle_thread_reuseregister_at_forkzneed os.register_at_forkc sfddtdh}||tdD]B}tjdtdd}|tWdq,1sd0Yq,Wdn1s0YdS)Ncs||dSrr)poolrvrrrszEThreadPoolExecutorTest.test_hang_global_shutdown_lock..submitrrrw)r`)r rurrr}rrrgtuple)rFrwrRworkersrrvrtest_hang_global_shutdown_locks     z5ThreadPoolExecutorTest.test_hang_global_shutdown_lockN) rHrIrJrirorqrtr skipUnlessrdrlrzrrrrrees   rec@steZdZeejdkdddZddZddZ e d d Z d d Z e d ddZddZddZddZdS)ProcessPoolExecutorTestryzWindows-only process limitcCs<|tdtjddWdn1s.0YdS)Nzmax_workers must be <= 61>r)rbr@r r}rErrrtest_max_workers_too_largesz2ProcessPoolExecutorTest.test_max_workers_too_largecCs`|jtjdg}tt|jj}||D]}| t |j q2| t |jjt dddS)Nrrr<) rirr)r*nextiterrr terminaterrrr)rFr rrrrrtest_killed_childs z)ProcessPoolExecutorTest.test_killed_childc sfdd}ttttdtd}tjjttdtddd|tjjttdtddd|tjjttdtddd|t|dS)Ncs$tjjttdtddddS)N(rarS)rrirrrrrErrbad_mapsz;ProcessPoolExecutorTest.test_map_chunksize..bad_maprr&rSr)rrrrrrirr@)rFrr@rrErtest_map_chunksizes z*ProcessPoolExecutorTest.test_map_chunksizecCs tddS)N{)rrrrr_test_tracebacksz'ProcessPoolExecutorTest._test_tracebackc Cs|j|j}|t}|Wdn1s60Y|j}|t|t | |j d|j }|t|t jj|d|jt:}z|Wn t ytjtYn0Wdn1s0Y|d|dS)N)rz&raise RuntimeError(123) # some comment)rirrrr+rrZassertIsrrrr& __cause__r process_RemoteTracebackrtbrcaptured_stderrr/ excepthookexc_infogetvalue)rFrrexccausef1rrrtest_tracebacks" &  2z&ProcessPoolExecutorTest.test_tracebackmd5cCs^|}t|}|jt|}|||jj ddd}t | | dS)Nrr5)rgManagerrKriridrrrMrmrrrpr)rFrNr\rrrrtest_ressources_gced_in_workerss z7ProcessPoolExecutorTest.test_ressources_gced_in_workerscCsj|j}|}|d}d|j}t|D]}||jq*|t|j |jt|D] }| qXdS)Nrrp) rirgrrnrrrrrrr)rFrir`rZ job_countrRrrrrqs    z'ProcessPoolExecutorTest.test_saturationcCsp|j}|jdddkr$td|tdd|tdd|td d |t |j d dS) NFrrw(Incompatible with the fork start method.rrr&r'rrrr) rirgrrrrr%rrrrrsrrrtest_idle_process_reuse_ones z3ProcessPoolExecutorTest.test_idle_process_reuse_onecCs|j}|jdddkr$td|tdd|tdd|tdd |td d |td d |tdd|t |j d| dS)NFrrwr r'!rrr r) rirgrrrrr%rZassertLessEqualrrrprsrrr test_idle_process_reuse_multiples z8ProcessPoolExecutorTest.test_idle_process_reuse_multipleN)rHrIrJrr{r/r{r~rr classmethodrrrZrequires_hashdigestrrqrrrrrrr|s      r|cCs*|rt|ddl}||dS)zInduces a segfault.rN)r)r* faulthandlerdisableZ_sigsegv)delayrrrr_crashs  rcCstddS)z#Induces a sys exit with exitcode 1.rN)r/exitrrrr_exitsrcCs |dS)z-Function that raises an Exception in process.Nr)Errrrr _raise_error!srcCsddl}|t_|dS)z@Function that raises an Exception in process and ignores stderr.rN)ioStringIOr/stderr)rrrrr_raise_error_ignore_stderr&s rcCs|S)z(Function that returns a instance of cls.rrrrr_return_instance-src@seZdZdZddZdS) CrashAtPicklez5Bad object that triggers a segfault at pickling time.cCs tdSrrrErrr __reduce__4szCrashAtPickle.__reduce__NrHrIrJ__doc__rrrrrr2src@seZdZdZddZdS)CrashAtUnpicklez7Bad object that triggers a segfault at unpickling time.cCstdfSNrrrErrrr:szCrashAtUnpickle.__reduce__Nrrrrrr8src@seZdZdZddZdS) ExitAtPicklez9Bad object that triggers a process exit at pickling time.cCs tdSrrrErrrr@szExitAtPickle.__reduce__Nrrrrrr>src@seZdZdZddZdS)ExitAtUnpicklez;Bad object that triggers a process exit at unpickling time.cCstdfSrrrErrrrFszExitAtUnpickle.__reduce__NrrrrrrDsrc@seZdZdZddZdS) ErrorAtPicklez3Bad object that triggers an error at pickling time.cCsddlm}|ddS)NrrzError in pickle)pickler)rFrrrrrLs zErrorAtPickle.__reduce__NrrrrrrJsrc@seZdZdZddZdS)ErrorAtUnpicklez5Bad object that triggers an error at unpickling time.cCsddlm}t|ffS)Nr)UnpicklingError)rrr)rFrrrrrSs zErrorAtUnpickle.__reduce__NrrrrrrQsrc@seZdZejZddZddddZddZd d Z d d Z d dZ ddZ ddZ ddZddZddZddZddZddZdd Zd!d"Zd#S)$ExecutorDeadlockTestcCsddl}ddlm}|dd.}|j|d|d|}Wdn1sR0Y|jD] }|qf|j ddt d|t j d| d |dS) Nr) TemporaryFilezw+)mode)fileTrlz Traceback: zExecutor deadlock: )rtempfilerZdump_tracebackseekreadrrrrpr.r/ __stderr__r)rFrirrrrrrrr_fail_on_deadlock[s    &  z&ExecutorDeadlockTest._fail_on_deadlockF ignore_stderrc Gs|jjdd|jd|d}|j|g|R}|r@t}nt}z`| |B||j |j dWdn1s~0YWdn1s0YWnt j y||Yn0|jdddS)NTrlrr^r5)rirprergrrrr nullcontextrrTIMEOUTr r7r)rFerrorfuncrr&rirrrrr _check_crashns  Nz!ExecutorDeadlockTest._check_crashcCs|tttdSr)rrrrrErrrtest_error_at_task_picklesz.ExecutorDeadlockTest.test_error_at_task_picklecCs|tttdSr)rrrrrErrrtest_exit_at_task_unpicklesz/ExecutorDeadlockTest.test_exit_at_task_unpicklecCs|tttdSr)rrrrrErrrtest_error_at_task_unpicklesz0ExecutorDeadlockTest.test_error_at_task_unpicklecCs|tttdSr)rrrrrErrrtest_crash_at_task_unpicklesz0ExecutorDeadlockTest.test_crash_at_task_unpicklecCs|ttdSr)rrrrErrr%test_crash_during_func_exec_on_workersz:ExecutorDeadlockTest.test_crash_during_func_exec_on_workercCs|ttdSr)r SystemExitrrErrr$test_exit_during_func_exec_on_workersz9ExecutorDeadlockTest.test_exit_during_func_exec_on_workercCs|tttdSr)rrrrErrr%test_error_during_func_exec_on_workersz:ExecutorDeadlockTest.test_error_during_func_exec_on_workercCs|tttdSr)rrrrrErrr)test_crash_during_result_pickle_on_workersz>ExecutorDeadlockTest.test_crash_during_result_pickle_on_workercCs|tttdSr)rrrrrErrr(test_exit_during_result_pickle_on_workersz=ExecutorDeadlockTest.test_exit_during_result_pickle_on_workercCs|tttdSr)rrrrrErrr)test_error_during_result_pickle_on_workersz>ExecutorDeadlockTest.test_error_during_result_pickle_on_workercCs|jtttdddS)NTr)rrrrrErrr3test_error_during_result_unpickle_in_result_handlerszHExecutorDeadlockTest.test_error_during_result_unpickle_in_result_handlercCs|tttdSr)rrrrrErrr2test_exit_during_result_unpickle_in_result_handlerszGExecutorDeadlockTest.test_exit_during_result_unpickle_in_result_handlerc Cs|jjdd|jd|db}||_|jtdd}|jdd|t|Wdn1sj0YWdn1s0YdS)NTrlrr^r:)r) rirprergrrrrr)rFrirrrrtest_shutdown_deadlocks  z+ExecutorDeadlockTest.test_shutdown_deadlockc Cs|jjdd|jd|dx}||_|td|j}|tt}|jdd| t |Wdn1s0YWdn1s0Y| dS)NTrlrr^r F) rirprergrrrrrrrr)rFriZexecutor_managerrrrrtest_shutdown_deadlock_pickles  Dz2ExecutorDeadlockTest.test_shutdown_deadlock_pickleN)rHrIrJrr_rrrrrrrrrrrrrrrrrrrrrrXs" rc@seZdZddZddZddZddZd d Zd d Zd dZ ddZ ddZ ddZ ddZ ddZddZddZddZdd Zd!d"Zd#d$Zd%d&Zd'd(Zd)S)* FutureTestscs:dfdd}t}|||d|ddS)Ncs |dSrrZcallback_futureZcallback_resultrrrNsz6FutureTests.test_done_callback_with_result..fnr\)radd_done_callbackrArrFrNrrrrtest_done_callback_with_results    z*FutureTests.test_done_callback_with_resultcs@dfdd}t}|||td|djdS)Ncs |dSrrrZcallback_exceptionrrrNsz9FutureTests.test_done_callback_with_exception..fnr=r=)rr set_exceptionr+rr&rrrr!test_done_callback_with_exceptions   z-FutureTests.test_done_callback_with_exceptioncs<dfdd}t}|||||dS)Ncs |dSrrrZ was_cancelledrrrNsz6FutureTests.test_done_callback_with_cancel..fn)rrrcancelrrrrtest_done_callback_with_cancels   z*FutureTests.test_done_callback_with_cancelcstx}ddfdd}fdd}t}|||||d|||d|Wdn1s0YdS)NFcsdtddS)NTdoh!r+r)raising_was_calledrr raising_fnsz9FutureTests.test_done_callback_raises..raising_fncsddS)NTrr) fn_was_calledrrrNsz1FutureTests.test_done_callback_raises..fnr\zException: doh!)rrrrrArrr)rFrrrNrr)rrrtest_done_callback_raises s        z%FutureTests.test_done_callback_raisescs:dfdd}t}|d|||ddS)Ncs |dSrrrrrrrN$sz=FutureTests.test_done_callback_already_successful..fnr\)rrArrrrrr%test_done_callback_already_successful"s    z1FutureTests.test_done_callback_already_successfulcs@dfdd}t}|td|||djdS)Ncs |dSrrrrrrrN/sz9FutureTests.test_done_callback_already_failed..fnr=r)rrr+rrr&rrrr!test_done_callback_already_failed-s   z-FutureTests.test_done_callback_already_failedcs<dfdd}t}|||||dS)Ncs |dSrrrrrrrN:sz.fn)rrrrrrrr$test_done_callback_already_cancelled8s   z0FutureTests.test_done_callback_already_cancelledcCsntR}dd}t}|d|||d||d|Wdn1s`0YdS)NcSs tddS)NrrrrrrrEszKFutureTests.test_done_callback_raises_already_succeeded..raising_fnr\zexception calling callback forr)rrrrArrr)rFrrrrrr+test_done_callback_raises_already_succeededCs   z7FutureTests.test_done_callback_raises_already_succeededcCsd|ttd|ttd|ttd|ttd|ttd|ttddS)Nz%z%z'z5z3)rreprrErFrrr#rrErrr test_reprSs(    zFutureTests.test_reprcCsttd}ttd}ttd}ttd}tttd}ttdd}||| |j t| || |j t||| |j t||| |j t| || |j t| || |j tdS)Nrrr\r!) rr r r r rOSErrorrrrrr)rFrf2Zf3Zf4Zf5Zf6rrr test_cancelds$     zFutureTests.test_cancelcCsX|t|t|t|t|t|tdSr) rrErrFrrrr#rrErrrtest_cancelled~s zFutureTests.test_cancelledcCsX|t|t|t|t|t|tdSr) rrErrFrrrr#rrErrr test_dones zFutureTests.test_donecCsX|t|t|t|t|t|tdSr) rrErunningrrFrrr#rrErrr test_runnings zFutureTests.test_runningcCsz|jtjtjdd|jtjtjdd|jtjtjdd|jtjtjdd|jt t jdd| t jddddS)Nrr5r ) rr r7rErrFCancelledErrorrrrr#rrrErrrtest_result_with_timeoutsz$FutureTests.test_result_with_timeoutcsJfdd}ttdtj|d}||jddd|dS)NcstdddS)Nrr )r)r*rArrrr notifications z:FutureTests.test_result_with_success..notificationrtargetr\r5r )rr rThreadstartrrrrFrr,rrrtest_result_with_successs    z$FutureTests.test_result_with_successcsLfdd}ttdtj|d}||jtjjt j d| dS)NcstddSNr)r)r*rrrrrrs z9FutureTests.test_result_with_cancel..notificationrrr5) rr rrrrr rrrr_rrrrrtest_result_with_cancels   z#FutureTests.test_result_with_cancelcCs|jtjtjdd|jtjtjdd|jtjtjdd|jtjtjdd| t t jddt | tjddddS)Nrr5)rr r7rErrFrrrr isinstancer#rrrrErrrtest_exception_with_timeouts z'FutureTests.test_exception_with_timeoutcsPfdd}ttdtj|d}||tjtj dt | dS)NcsLtdj(t_t_jWdn1s>0YdSr )r)r* _conditionrrrr notify_allrrrrrs  z=FutureTests.test_exception_with_success..notificationrrr5) rr rrrrr rrr_rrrrrrtest_exception_with_successs    z'FutureTests.test_exception_with_successcCsnttd}|d|tjd|dWdn1sB0Y|||| ddS)Nrrz=FINISHED: r) rr rArbr InvalidStateErrorrrrr)rFrrrrtest_multiple_set_results  (z$FutureTests.test_multiple_set_resultcCshttd}t}|||tjd|tWdn1sJ0Y|| |dS)NrzBFINISHED: ) rr r@rrbr rr+rr)rFrrrrrtest_multiple_set_exceptions  *z'FutureTests.test_multiple_set_exceptionN)rHrIrJrrrrrrrrrrrrrrr r r rrrrrrrrs(        rcCs.ttjjt}tjtjg|RdSr)rZaddModuleCleanupmultiprocessingutil_cleanup_testsrrUrY) thread_inforrr setUpModulesr__main__)N)N)_r=r import_moduleZ*skip_if_broken_multiprocessing_synchronizeZ test.supportrZtest.support.script_helperrrr9r;Zlogging.handlersrrlrr/rr)rr?rr concurrentr concurrent.futures._baser r r r rrrZconcurrent.futures.processrZmultiprocessing.processrZmultiprocessing.utilrrZcheck_sanitizerrrrErFrrrr#rr5r%r(r-r3r6r7rCobjectrDrKrSZTestCaserTr[rtrvr~rrrrrrrr r*r1rIrer|rrrrrrrrrrrrrrrHmainrrrrs       $         !   8m^OmRV4u