[Twisted-Python] Deferred.callback() v. Deferred.called
Lenny G Arbage
alengarbage at yahoo.com
Thu Feb 9 11:09:42 MST 2006
Jean-Paul Calderone exarkun at divmod.com wrote:
>>def waitForDeferredResult(d):
>> while not d.called:
>> reactor.iteratoe(0.1)
>> return d.result
>>
>
> This function is broken. d.called isn't really
> public. d.result isn't really public.
> reactor.iterate() isn't really public.
> You cannot poll a Deferred like this and expect
> it to work. Lots of people have tried. It
> just can't be done.
Okay, I have repented and waitForDeferredResult()
has been terminated. I will return to saner methods.
BTW, trial is really nice. You may find it somewhat
ironic that I actually got the idea for using
reactor.iterate() from the trial howto
(http://twisted.sourceforge.net/TwistedDocs-1.2.0rc3/howto/test-standard.html)
Lenny
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
More information about the Twisted-Python
mailing list