← Back to team overview

ubuntu-phone team mailing list archive

Re: LP: #1260712 post-mortem and improving our processes

 

Alberto Mardegan [2013-12-17 22:50 +0200]:
> But if I got it right, Barry needed an asynchronous method
> *implementation*, on the server side. Actually the tutorial you linked
> if mentions that it's possible, however it doesn't document it:
> 
> http://dbus.freedesktop.org/doc/dbus-python/doc/tutorial.html#asynchronous-method-implementations

Ah, he mentioned getting D-BUS timeouts, so I figured that timeout
would happen on the client side and thus he wanted a client-side async
method call. But you can implement async method call handling on the
server side, too, by using "async_callbacks" in the
@dbus.service.method decorator. Have a look at

  http://dbus.freedesktop.org/doc/dbus-python/api/dbus.service-module.html#method

This also treats this subject:

  http://stackoverflow.com/questions/2142115/implementation-of-an-async-method-in-python-dbus

However, there's not a lot of existing examples there, it seems few
people ever do this.

Martin
-- 
Martin Pitt                        | http://www.piware.de
Ubuntu Developer (www.ubuntu.com)  | Debian Developer  (www.debian.org)


References