mvidner / ruby-dbus

A Ruby binding for DBus
GNU Lesser General Public License v2.1
170 stars 51 forks source link

Close dbus connection? #43

Open swistaczek opened 11 years ago

swistaczek commented 11 years ago

Hello @mvidner, I would like to ask you if there is any option to close DBus connection? I am iterating through Modem Manager modems and after gathering some information I would like to close dbus connection.

mvidner commented 11 years ago

The library currently does not care about closing the connection. That is bad form but I wonder whether it actually hurts in practice. You can get at the socket used by the connection and close it yourself, but please be aware that I consider the socket attribute an implementation detail that may be moved somewhere else.

mvidner commented 11 years ago

Notes to self: Things to consider when adding DBus::Connection#close:

DBus::ConnectionQueue#close exists in the multithreading branch.