[patch] Fix refcounting and locking in dbus-connection
hp at redhat.com
Tue Sep 5 17:58:34 PDT 2006
John (J5) Palmieri wrote:
> If it is not "shared" it is not put in the hash and reffed but it is
> still reffed by the bus. In the case of the guid connections both the
> bus and the hash take a ref. In fact we could most likely use the guid
> as the shared flag instead of having the extra one (though the extra one
> is a bit clearer). I'm not sure if I understand your concern since each
> element which holds on to a connection now takes a ref and performs
> unrefs independent of each other (though in reality a disconnect will
> trigger them both).
The whole thing we're fixing here is that there has to be an owner for
close(). refcounting does not help with that. If the connection is not
shared (no guid), then who calls close()?
>> As an aside, the guid is way too long; for mugshot we made it a lot
>> shorter using "base53" encoding instead of hex encoding ;-) also 128
>> bits is probably huge overkill.
> Is this a before or after 1.0 feature?
It's not an important feature one way or the other ;-) I was just
noticing that the address looked kinda ugly with the huge guid...
More information about the dbus