Opened 11 years ago

Last modified 11 years ago

#48 defect closed fixed (fixed)

defer.DeferredList([]) problem

Reported by: radix Owned by:
Priority: high Milestone:
Component: Keywords:
Cc: radix Branch:
Author: Launchpad Bug:

Description


Change History (4)

comment:1 Changed 11 years ago by radix

I have done something like that:

def remote_pbfunction(self,*args):
d1 = defer.Deferred()
d1.addCallback(self.doSomething)
d2 = defer.Deferred()
d2.addCallback(self.doSomething)
dl = defer.DeferredList([])
dl.addDeferred(d1)
dl.addDeferred(d2)
dl.addCallbacks(self.doSomeOtherThing)
d1.callback(paras)
d2.callback(paras)
return dl

The result was that self.doSomething never was
processed. The only method that was processed is
doSomeOtherThing.

If i change this code to :

def remote_pbfunction(self,*args):
d1 = defer.Deferred()
d1.addCallback(self.doSomething)
d2 = defer.Deferred()
d2.addCallback(self.doSomething)
dl = defer.DeferredList([d1])
dl.addDeferred(d2)
dl.addCallbacks(self.doSomeOtherThing)
d1.callback(paras)
d2.callback(paras)
return dl

Everything is working fine.

It seems like a passing a empty list to the constructor
of defer.deferredList() causes a bug in the execution.

comment:2 Changed 11 years ago by davep

I think I haved fixed this.

comment:3 Changed 11 years ago by davep

I'm going to go ahead and close this one.

comment:4 Changed 3 years ago by <automation>

Note: See TracTickets for help on using tickets.