Fwd: Circular calls with DBUS

John (J5) Palmieri johnp at redhat.com
Thu Mar 22 13:08:31 PDT 2007


On Thu, 2007-03-22 at 19:48 +0100, Thiago Macieira wrote:
> Matthew Johnson wrote:
> >For those on the list, this thread is about reentrant calls in D-Bus;
> >that is when application A makes a call on application B, and
> >application B's handler for that call makes another call back to
> >application A. Jacques thought this could be handled more nicely if a
> >'call trace' was stored in the header of each message so that the second
> >call was associated with the first.
> 
> We agreed last year we don't want that. The applications that try to make 
> this should deadlock visibly during their development phases, so that 
> developers take the time to make asynchronous calls.
> 
> We reached that conclusion because the "call stack" or similar mechanisms 
> (like used to exist in DCOP) solve the problem for the simple deadlocks, 
> but make it a lot harder to spot the more complex ones. And those end up 
> creeping into the final releases.

Yep. async calls solve this problem and others without further
complicating D-Bus.  Always use async calls if possible.

-- 
John (J5) Palmieri <johnp at redhat.com>



More information about the dbus mailing list