[Twisted-Python] Deferred.callback() v. Deferred.called

Lenny G Arbage alengarbage at yahoo.com
Thu Feb 9 13:09:42 EST 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


Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 

More information about the Twisted-Python mailing list