[Twisted-Python] Re: Waiting on a Deferred
exarkun at divmod.com
Wed Jul 23 13:42:20 EDT 2008
On Wed, 23 Jul 2008 10:35:47 -0700, Don Dwiggins <ddwiggins at advpubtech.com> wrote:
>Jean-Paul Calderone wrote:
>>You don't need to "call asynchronous methods synchronously" to do this.
>>twisted.web.xmlrpc.XMLRPC.xmlrpc_* methods can return Deferreds. If they
>>do, the response to the browser is delayed until the result of the Deferred
>So "return defer.succeed(...)" in an xmlrpc_* method is harmless, but
>unnecessary when "..." is immediately available?
When "..." isn't a Deferred, yes. Both versions have the same outcome.
More information about the Twisted-Python