Unknown reply timeout for blocking calls
simon.mcvittie at collabora.co.uk
Tue Apr 15 07:31:33 PDT 2008
-----BEGIN PGP SIGNED MESSAGE-----
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.
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.)
-----BEGIN PGP SIGNATURE-----
-----END PGP SIGNATURE-----
More information about the dbus