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). Which can be the reason of the mainloop "block"? 2010/5/23 <exarkun@twistedmatrix.com>
On 12:21 pm, gabriele.lanaro@gmail.com wrote:
Finally I managed to solve myself this obscure bug. I put the reactor.iterate() call before spawning new callbacks, in this way I force the mainloop to complete the cycle. The pseudocode would be modified in this way:
Client() proceed_sending():
chunk_tot = CHUNK_TOT chunk_no = 0
def send(_) if chunk_no == CHUNK_TOT: return else: ... read data... reactor.iterate() <---------------------------------------------------------- THIS LINE d = filesender.callRemote("send_ chunk", secret, chunk_no, data) d.addCallback(send)
Erm. Sorry. This isn't a solution to whatever problem you're having. It is entirely invalid to use reactor.iterate() in this way.
Jean-Paul
_______________________________________________ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python