Re: [PATCH] docs: fix docs to match behavior of virConnectClose

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 06/22/2011 11:30 AM, Matthias Bolte wrote:
>> Hmm, good points.  How about:
>>
>> Connections are reference counted; the count is explicitly increased by
>> virConnectRef and virConnectOpen, as well as temporarily increased by
>> other API that depend on the connection remaining alive.  Every
>> virConnectRef and virConnectOpen call should have a matching
>> virConnectClose, and all other references will be released after the
>> corresponding operation completes.
> 
> There is virConnectOpenReadOnly and virConnectOpenAuth too.

I went with the more general:

... the count is explicitly
 * increased by the initial open (virConnectOpen, virConnectOpenAuth,
 * and the like) as well as virConnectRef;

> You're a bit vague about the "other API", but I think its better this
> way than being too explicit and creating some kind of list that need
> to be maintained here.

Agreed.

> 
>> The return value is the number of remaining references on success
>> (positive implies that some other call still has a reference open, 0
>> implies that no references remain and the connection is closed), or -1
>> on failure.  It is possible for the last 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 that matches the virConnectOpen.

and here, I did s/virConnectOpen/the initial open/

> 
> ACK.

Pushed.

-- 
Eric Blake   eblake@xxxxxxxxxx    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]