[Twisted-Python] Repeatedly calling Deferred.callback()

Jean-Paul Calderone exarkun at divmod.com
Thu Jan 12 00:15:19 EST 2006

On Wed, 11 Jan 2006 20:52:02 -0800, Brian Granger <bgranger at scu.edu> wrote:
>Are Deferred objects designed to have their callback method called  multiple 
>times it there are a multiple (discrete) results that arrive 
>asynchronously?  If not, what is the proper construct in Twisted for 
>returning multiple asynchronous results from a single method?

Nope, they're not.  Twisted generally reverts to named method callbacks or explicit listener registration for cases where multiple results are possible.  I've played with support code for simplifying this in the past, but it has never really resulting in something that was easier to use.


More information about the Twisted-Python mailing list