Synchronous calls to the same mainloop

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


--- Havoc Pennington <hp at redhat.com> 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
blocking
> 
> 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
integration)
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 lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dbus
> 



		
___________________________________________________________ 
Telefonate ohne weitere Kosten vom PC zum PC: http://messenger.yahoo.de


More information about the dbus mailing list