In which sense it's invalid? I don't know how the gtk reactor works, I just guessed that the event loop never reaches the gui events. My idea was to force the processing of these events before spawning another deferred, it's just a workaround, the real problem is the fact that the server and the client resides in the same loop (for testing).<br>
<br>Which can be the reason of the mainloop "block"?<br><br><div class="gmail_quote">2010/5/23 <span dir="ltr"><<a href="mailto:exarkun@twistedmatrix.com">exarkun@twistedmatrix.com</a>></span><br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div class="im">On 12:21 pm, <a href="mailto:gabriele.lanaro@gmail.com">gabriele.lanaro@gmail.com</a> wrote:<br>
>Finally I managed to solve myself this obscure bug. I put the<br>
>reactor.iterate() call before spawning new callbacks, in this way I<br>
>force<br>
>the mainloop to complete the cycle. The pseudocode would be modified in<br>
>this<br>
>way:<br>
><br>
>Client()<br>
> proceed_sending():<br>
><br>
> chunk_tot = CHUNK_TOT<br>
> chunk_no = 0<br>
><br>
> def send(_)<br>
> if chunk_no == CHUNK_TOT: return<br>
> else:<br>
> ... read data...<br>
> reactor.iterate()<br>
><---------------------------------------------------------- THIS LINE<br>
> d = filesender.callRemote("send_<br>
>chunk", secret, chunk_no, data)<br>
> d.addCallback(send)<br>
<br>
</div>Erm. Sorry. This isn't a solution to whatever problem you're having.<br>
It is entirely invalid to use reactor.iterate() in this way.<br>
<br>
Jean-Paul<br>
<div><div></div><div class="h5"><br>
_______________________________________________<br>
Twisted-Python mailing list<br>
<a href="mailto:Twisted-Python@twistedmatrix.com">Twisted-Python@twistedmatrix.com</a><br>
<a href="http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python" target="_blank">http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python</a><br>
</div></div></blockquote></div><br>