Synchronous calls to the same mainloop

Havoc Pennington hp at
Fri Nov 10 09:50:01 PST 2006

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.

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.

Another thing you could do is introduce a transport that isn't a socket 
at all, but just keeps message objects in a queue.


More information about the dbus mailing list