Next: , Previous: buildbot.util.bbcollections, Up: Utilities


8.3.2 buildbot.util.eventual

This package provides a simple way to say "please do this later":

     from buildbot.util.eventual import eventually
     def do_what_I_say(what, where):
         # ...
     eventually(do_what_I_say, "clean up", "your bedroom")

The package defines "later" as "next time the reactor has control", so this is a good way to avoid long loops that block other activity in the reactor. Callables given to eventually are guaranteed to be called in the same order as the calls to eventually. Any errors from the callable are logged, but will not affect other callables.

If you need a deferred that will fire "later", use fireEventually. This function returns a deferred that will not errback.