In which sense it&#39;s invalid? I don&#39;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&#39;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 &quot;block&quot;?<br><br><div class="gmail_quote">2010/5/23  <span dir="ltr">&lt;<a href="mailto:exarkun@twistedmatrix.com">exarkun@twistedmatrix.com</a>&gt;</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>
&gt;Finally I managed to solve myself this obscure bug. I put the<br>
&gt;reactor.iterate() call before spawning new callbacks, in this way I<br>
&gt;force<br>
&gt;the mainloop to complete the cycle. The pseudocode would be modified in<br>
&gt;this<br>
&gt;way:<br>
&gt;<br>
&gt;Client()<br>
&gt;    proceed_sending():<br>
&gt;<br>
&gt;          chunk_tot = CHUNK_TOT<br>
&gt;          chunk_no = 0<br>
&gt;<br>
&gt;          def send(_)<br>
&gt;                if chunk_no == CHUNK_TOT: return<br>
&gt;                else:<br>
&gt;                     ... read data...<br>
&gt;                    reactor.iterate()<br>
&gt;&lt;---------------------------------------------------------- THIS LINE<br>
&gt;                    d = filesender.callRemote(&quot;send_<br>
&gt;chunk&quot;, secret, chunk_no, data)<br>
&gt;                    d.addCallback(send)<br>
<br>
</div>Erm.  Sorry.  This isn&#39;t a solution to whatever problem you&#39;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>