Synchronous calls to the same mainloop
hp at redhat.com
Fri Nov 10 12:05:46 PST 2006
Havoc Pennington wrote:
> 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.
I guess this is a little misleading answer; as Thiago says we did have a
thread where we decided there were some real disadvantages to the "call
stack ID" thing in theory (it could not solve all the cases, so really
just made deadlock bugs more heisenbug-like instead of fixing them).
If we were going to reconsider this it would probably be important to
dig that thread out of the archives and review some of the thinking.
Anyway, figuring out the API and protocol isn't quite enough, the
higher-level discussion of whether it's a good idea in the first place
would also need revisiting.
More information about the dbus