Making asynchronous calls

Simon McVittie simon.mcvittie at collabora.co.uk
Thu Feb 7 08:51:20 PST 2008


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Thu, 07 Feb 2008 at 16:34:31 +0000, Robert Rawlins wrote:
> Ok, so perhaps this is the problem, it doesn't look as if the method call I'm calling against on my API is asynchronous, it doesn't return a value straight away or accept a callback argument, it just processes and returns the value in a synchronous manor. The API I'm making calls too is another DBUS interface, apparently with some functions being asynchronous, unfortunately the one in particular that I'm calling, isn't.

If the function you're calling takes a significant time, but can only be
called synchronously, then that's a bug in the library it comes from.
Try to use a better library... or failing that, use some sort of
worker-thread hack like I suggested before.

If your service is itself making a D-Bus call as a client (i.e. it's some
sort of proxy), note that all D-Bus method calls (in dbus-python and dbus-glib
at least) can be made synchronously or asynchronously, regardless of how the
service is implemented.

    Simon
-----BEGIN PGP SIGNATURE-----

iD8DBQFHqzcIWSc8zVUw7HYRAl8TAKCA1UvaTyITvJE0hfsF/8xhAK9CqQCgvn1w
Q4ulfKyKAtqcCL8ASbBLCs0=
=ubbT
-----END PGP SIGNATURE-----


More information about the dbus mailing list