[Buildbot-devel] deferreds from polling change source
tom.prince at ualberta.net
Thu Jun 27 23:14:26 UTC 2013
Jorge Gonzalez <gjorge at google.com> writes:
> def poll(self):
> defered_poll = defer.Deferred()
> defered_poll.addCallback(lambda _: self.DoTheActualPoll())
> return defered_poll
`.doTheActualPoll` will just be called when `.callback` is
called. Deferreds don't magically make something asynchronous, they are
just a way of organizing callbacks.
The right way to do this is to change `.doTheActualPoll` to be
asynchronous. How to do this will depend on what is doing. Anything else
will cause everything to freeze while it is running.
More information about the devel