I'm playing with PB, and it's booth cool and somewhat confusing. So I
have some remote_* methods, e.g.

def remote_ping(self):
    return 'pong'

def remote_run(self):
    d = Deferred()
    d.AddCallback(self.got_result)
    # return d # <- magic here when deferred is returned?

def got_result(self, res)
    return res

When I do callRemote('ping') and execute callback, I am getting 'pong'
as a result. However, when I do callRemote('run'), it returns a
deferred which returns None, which is expected, as remote_run()
doesn't have any result yet.

However, if I return deferred ("d") from remote_run, then callRemote('run') 
gives me
the result. Is it some expected magic going on when remote_ method returns a 
deferred?
_______________________________________________
Twisted mailing list -- twisted@python.org
To unsubscribe send an email to twisted-le...@python.org
https://mail.python.org/mailman3/lists/twisted.python.org/
Message archived at 
https://mail.python.org/archives/list/twisted@python.org/message/FXBNTGG4PRSBZUBPKAKANYK3UAEBI7MX/
Code of Conduct: https://twisted.org/conduct

Reply via email to