pendingcalls without timeout
andersg at 0x63.nu
Mon Mar 15 12:43:54 PST 2004
we have a system with a server and clients, that connect using a dbus
(an own bus). The client issues commands like "start doing stuff",
"stop doing stuff", "get list of stuff that you are prepared to do",
"get current status". All those give a immediate response, and are
implemented as dbus-methodcalls and the client uses pendingcalls. This
works very well, and we have some really nice functions that converts
between our internal (in the server) object model and dbus-messages.
However there is also some calls "wait until status changes and report
it". However, pending calls have a timeout, and that call might take
some time to return (in the range milliseconds to days). I see no
reason why pending calls MUST have a timeout. Could someone please
care to explain?
Someone will probably argue that this should be solved using signals
emitted by the server, but it would be to wasteful to broadcast those
signals to all clients. So some signal-subscription would be
needed. That would just duplicate code that would come from free with
pendingcalls without timeout. It would also require more code
duplication in the serverside.
More information about the dbus