[Twisted-Python] I see, remote_method can also return a deferred. Perhaps we could document that?

exarkun at twistedmatrix.com exarkun at twistedmatrix.com
Tue Jan 10 09:19:28 EST 2012

On 22 Sep 2011, 01:19 pm, a.libran at gmail.com wrote:
>I almost gave up choosing twisted until I found this explanation
>which basically says a remote_method can return a deferred. In this
>case, the PB server won't return the result of the Deferred back to
>the client until the server-side callback fires. The result of the
>remote_method is then returned to the client, which then triggers
>client side's deferred callback.
>So, I thought one of the following would be helpful:
>1) An example showing remote_method returning a deferred
>2) A section named "Server side remote_* methods can be async by
>returning deferreds" could be added as a 7th item in
>I spent some quality 30+ hours carefully reading 90% of the
>and I do not remember picking this subtlety up. (Or you can point me
>the right place in doc.) (great doc btw.)
>Should I submit an improvement ticket for this? I could also make the
>server side example using Echoer, remote_echo, and deferToThread just
>so that whoever fixes the ticket can just copy and paste.

It looks like there is actually a ticket for this issue:


with some work invested in resolving it.  Anyone care to pick up where 
the previous developer left off?


More information about the Twisted-Python mailing list