<div dir="auto">E come dovrei implementare il gather per aspettare che il task si concluda?</div><div class="gmail_extra"><br><div class="gmail_quote">Il 11 Nov 2017 17:11, "Christian Barra" <<a href="mailto:barrachri@gmail.com">barrachri@gmail.com</a>> ha scritto:<br type="attribution"><blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><br><div>
<div style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word"><div style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word"><div style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word"><div style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word"><div style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word"><div style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word"><div style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word"><div style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word"><div style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word"><div style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word"><div style="word-wrap:break-word"><br></div></div></div></div></div></div></div></div></div></div></div>
</div>
<br><div><div class="quoted-text"><blockquote type="cite"><div>On 11 Nov 2017, at 13:55, Vinny Mautone <<a href="mailto:vinny74man@gmail.com" target="_blank">vinny74man@gmail.com</a>> wrote:</div><br class="m_3321751508383416401Apple-interchange-newline"><div><div dir="ltr">Scusa cosa intendi per consumare il task con gather?<div>Io per il momento lo sto semplicemente cancellando, perchè se non ho connessione col server non mi interessa che fine fa, però vorrei capire cosa intendi col gather.</div></div></div></blockquote><div><br></div></div>Quando chiami il cancel su un task quello che succede e’ un raise CancelError all’interno del task.</div><div>Dipende da quello che ci devi fare ti potrebbe interessare non solo cancellare il task ma anche un graceful shutdown, o attendere fine anche il task non viene completato.</div><div><br></div><div>Con gather aspetti che i tasks si concludano.<br><br></div><div class="quoted-text"><div><div style="word-wrap:break-word">——</div><div style="word-wrap:break-word"><div>Christian Barra</div><div>Python Freelancer // Consultant // Trainer<br>Board member of the EuroPython Society</div><div><a href="http://www.chrisbarra.xyz" target="_blank">www.chrisbarra.xyz</a></div></div></div><br></div></div><br>______________________________<wbr>_________________<br>
Python mailing list<br>
<a href="mailto:Python@lists.python.it">Python@lists.python.it</a><br>
<a href="https://lists.python.it/mailman/listinfo/python" rel="noreferrer" target="_blank">https://lists.python.it/<wbr>mailman/listinfo/python</a><br>
<br></blockquote></div><br></div>