[Twisted-Python] Non returning deferred result.
Andrew Bennetts
andrew-twisted at puzzling.org
Fri Apr 18 01:37:25 MDT 2008
Crispin Wellington wrote:
> Just a quick update. Doing a "reactor.iterate()" after the callback
> fixed the behavoir. ie.
>
> --------
> deferred.callback( http.Response(responsecode.OK,
> {'content-type': http_headers.MimeType('text', 'html')},
> "Success!" ) )
> reactor.iterate()
> --------
>
> so my new question is, is this the best way to do this? Is there a
> better way? Also is reactor.iterate() threadsafe? Are there potential
> problems callinf reactor.iterate() from a thread spawned off the running
> reactor thread?
No, this is definitely not safe. Two wrongs don't make a right! See my other
mail :)
-Andrew.
More information about the Twisted-Python
mailing list