Fwd: Circular calls with DBUS
John (J5) Palmieri
johnp at redhat.com
Fri Mar 23 09:04:22 PDT 2007
On Fri, 2007-03-23 at 15:30 +0000, Rob Taylor wrote:
> Jacques Guillou wrote:
> > Is there a way to configure the GLib binding in such a way that an incoming
> > message can be preocessed even if the main loop execution is stopped into a
> > synchronous call (waiting for its answer) ?
> > Would that be safe ?
> > I really think using asynchronous calls only would make a system much more
> > complex than it would be if synchronous calls were allowed.
> Async call handling is the only way to (possibly) totally avoid
> deadlock, any other scheme leads to subtle deadlock cases (see mailing
> list history for a discussion of this, in respect to DCOP deadlock
> Note that only code providing objects on the bus needs to use async
> calling, normal clients can still use synchronous calls.
I never like to say this because of the "programmers are lazy" syndrome.
I think learning how to do async calls and using them everywhere will
make them much easier to deal with in the long run (sure mainloop event
programming was once hard to deal with but when is the last time you
wrote something serious without a mainloop?). That being said we should
look at our bindings and figure out if there is a way to make chaining
async calls easier. In python we could do something similar to twisted
John (J5) Palmieri <johnp at redhat.com>
More information about the dbus