[Twisted-Python] setTimeout in Deferred

Yun Mao maoy at cis.upenn.edu
Tue Mar 8 13:00:50 MST 2005


This is the doc of setTimeout:

         """Set a timeout function to be triggered if I am not called.

         @param seconds: How long to wait (from now) before firing the
         timeoutFunc.

         @param timeoutFunc: will receive the Deferred and *args, **kw as 
its
         arguments.  The default timeoutFunc will call the errback with a
         L{TimeoutError}.

         DON'T USE THIS! It's a bad idea! Use a function called by 
reactor.callLater instead
         to accomplish the same thing!

         YOU HAVE BEEN WARNED!
         """

Any reason why not? It seems to me that setTimeout just calls 
reactor.callLater()

Yun





More information about the Twisted-Python mailing list