Unknown reply timeout for blocking calls

Simon McVittie simon.mcvittie at collabora.co.uk
Tue Apr 15 07:31:33 PDT 2008


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

On Tue, 15 Apr 2008 at 16:08:55 +0000, Bahadır Kandemir wrote:
> I'm writing a python-dbus client for a server that replies minutes (sometimes 
> more than 10 minutes, depending on operation, ofc.) after method call. Should 
> I set timeout to a high value, or is there any other way except using async. 
> calls?

Set a long timeout. Additionally, you should use async calls so your client can
do other things in the meantime, if this would be useful.

If you make an async call with a short (or default) timeout, the library
you'll still get a timeout error reply after that time has elapsed:
sync/async only affects how you get the result, not what the timeout is
or whether there is one.

(If you control the server's API too, it may be useful to change its
API to have "request + signal" semantics, where RequestFoo() returns
immediately, and a signal is emitted later when the requested change actually
happens (or fails). You can choose to use either pattern.)

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

iD8DBQFIBLxFWSc8zVUw7HYRAjLKAJ4s/8jsX2qKUf+A+p1WxbRMFLZS6gCgx6EY
5hboBseWxNYM91Rk52SXfiU=
=64Sy
-----END PGP SIGNATURE-----


More information about the dbus mailing list