[Twisted-Python] Returning a DeferredList?

Nathan nathan.stocks at gmail.com
Tue Jul 1 12:57:45 EDT 2008


On Tue, Jul 1, 2008 at 10:41 AM, Terry Jones <terry at jon.es> wrote:
> That sounds right too. It might help to know that a DeferredList is just a
> subclass of Deferred. So when you return a DeferredList, you're in fact
> returning something that behaves like a regular Deferred. When its callback
> is fired, it gets a list of status & results from all the deferreds in the
> originally passed list. So if AMP knows how to handle deferreds, it can
> certainly handle a DeferredList too.

I didn't know that!  Well, I'll just go ahead and try returning my
DeferredList as my AMP response and see if the return value of the
callback gets to the other end of the AMP connection.

> Nathan> Have I got it straight now?
>
> Yep, sounds like it.

Hooray!

~ Nathan




More information about the Twisted-Python mailing list