コード例 #1
0
 def run(r=None):
     if w.total > 1000:
         reactor.stop()
         return
     w.total += 1
     df = launch_coroutine(wrap_task(reactor.callLater), w.do_some_things)
     df.addCallback(run)
     df.addErrback(set_event_error)
コード例 #2
0
 def run_task_and_exit():
     #for i in xrange(1000):
     for i in xrange(100040):
         w.total += 1
         df = launch_coroutine(wrap_task(reactor.callLater),
                               w.do_some_things)
         df.addCallback(set_event)
         df.addErrback(set_event_error)
コード例 #3
0
 def run_task_and_exit():
     #for i in xrange(1000):
     for i in xrange(100040):
         w.total += 1
         df = launch_coroutine(wrap_task(reactor.callLater),
                               w.do_some_things)
         df.addCallback(set_event)
         df.addErrback(set_event_error)
コード例 #4
0
 def run(r=None):
     if w.total > 1000:
         reactor.stop()
         return
     w.total += 1
     df = launch_coroutine(wrap_task(reactor.callLater),
                           w.do_some_things)
     df.addCallback(run)
     df.addErrback(set_event_error)