[Twisted-Python] Non returning deferred result.
Crispin Wellington
cwellington at ccg.murdoch.edu.au
Fri Apr 18 04:33:05 MDT 2008
Yeah, I replaced this with your thread safe suggestion.
Thanks again
Crispin
On Fri, 2008-04-18 at 17:37 +1000, Andrew Bennetts wrote:
> 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.
>
>
> _______________________________________________
> Twisted-Python mailing list
> Twisted-Python at twistedmatrix.com
> http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
>
More information about the Twisted-Python
mailing list