Making asynchronous calls
simon.mcvittie at collabora.co.uk
Thu Feb 7 08:51:20 PST 2008
-----BEGIN PGP SIGNED MESSAGE-----
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.
-----BEGIN PGP SIGNATURE-----
-----END PGP SIGNATURE-----
More information about the dbus