Defer problem

wladimir wladimirufc at gmail.com
Wed Jan 7 13:44:43 CET 2009


Hi,

I have an problem. I want to fire one callback after n callbacks fired, but
when i fire one callback all the chain will be executed. Example:

def handle(x):
    print 'callback ' + str(x)
    

def handle2(x):
    print 'after callbacks'


d1 = defer.Deffered()
d2 = defer.Deffered()
d3 = defer.Deffered()

d = defer.DeferredList([d1, d2, d3], fireOnOneCallback =1 ,
fireOnOneErrback=1)

d1.addCallback(handle)
d2.addCallback(handle)
d3.addCallback(handle)
#d.addCallback(handle2)

d1.callback(1)
d2.callback(2)
d3.callback(3)

I want fire handle2 after all handle



-- 
View this message in context: http://www.nabble.com/Defer-problem-tp21330603p21330603.html
Sent from the Python - python-list mailing list archive at Nabble.com.




More information about the Python-list mailing list