[libvirt-users] Detecting the last user of a connection has closed.

Andy Joslin libvirt at bandjos.com
Tue Aug 16 18:04:01 UTC 2011


The documentation says something that concerns me:
http://libvirt.org/html/libvirt-libvirt.html#virConnectClose

      "It is possible for the last
virConnectClose<http://libvirt.org/html/libvirt-libvirt.html#virConnectClose>to
return a positive value if some
       other object still has a temporary reference to the connection,   but
the
       application should not try to further use a connection after the
       virConnectClose<http://libvirt.org/html/libvirt-libvirt.html#virConnectClose>that
matches the initial open."



The application I am working on requires that I know when the last thread
using this connection goes away, so I can properly cleanup some overhead.
 If I can't trust the return value of this call, how will I know that the
connection is indeed torn down?

Under what circumstances will the virConnectClose behave this way?

Thanks,

BTW, I am using 0.8.2
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/libvirt-users/attachments/20110816/b3242f9f/attachment.htm>


More information about the libvirt-users mailing list