Synchronous calls to the same mainloop

uwesmail2005-lkml at uwesmail2005-lkml at
Fri Nov 10 11:01:59 PST 2006

--- Havoc Pennington <hp at> schrieb:

> keith preston wrote:
> > This is my first stab at dbus internals, but I have implemented the
> > second option and the patch is included.   The patch isn't perfect.
>   It 
> > spits out a couple early warnings about passing null to 
> > dbus_message_has_sender() when dbus is just starting up and 
> > dbus_bus_get_unique_name returns null, but I think it is good for 
> > discussion.
> > 
> This has a couple of problems; one is that the connection may not be
> to 
> a bus, so no unique name. Two is that it dispatches while blocking, 
> which the current API guarantees will not happen.
That guarantee must be softened: There should be possibilities to
set a "Do not disturb" on methods that work on the same object or the
same method. But they should never block access to another object on
the same BusName. That would make objects more important and so better
used (as boundaries of (soft) synchronisation).
That "Do not disturb" would send a "recursion error" instead of
> The answer right now is that to do what you want you must use a 
> nonblocking API or you must use threads.
> A larger answer might be one of the "call stack ID" kind of ideas,
> but 
> nobody has really tried to figure out in detail how that would work, 
> what API and protocol changes would be involved, etc.
Am I nobody? You have even answered me on one of these "call stack ID"
ideas. The answer on the protocol change was "later" even when it was
in TODO (Line 100 then). I have tried to work out *exactly* what
would be involved: No API change in lib, Some easily compatible change
in mainloop implementation (could even make easier mainloop
and a change in Protocol where I don't know how compatible that is
because I didn't find any protocol spec.
> Another thing you could do is introduce a transport that isn't a
> socket 
> at all, but just keeps message objects in a queue.
> Havoc
> _______________________________________________
> dbus mailing list
> dbus at

Telefonate ohne weitere Kosten vom PC zum PC:

More information about the dbus mailing list