[libvirt-users] can remote libvirt applications make non-blocking API calls

Eric Blake eblake at redhat.com
Tue Apr 9 22:02:41 UTC 2013


On 04/08/2013 04:49 PM, arvind viswanathan wrote:
> Hi,
> I wanted to check if event loop integration was supported even for remote
> applications using libvirt. My application would like to make non-blocking
> calls and also recv asynchronous notification remotely. Can some one point
> out if its supported.

Yes, event registration and asyncrhonous notifications work even across
remote connections.  Several APIs are documented as firing events on
completion.  There are still some APIs that are blocking by default, and
where patches may be needed to let those APIs start a asynchronous
long-running job where you can rely on event notification or polling to
learn when it is done (most notably, we need to rework the
virStoragePool and virStorageVol APIs to add a concept of jobs); patches
are welcome if you are interested in improving the code base.  But for
other existing APIs, such as lifecycle changes in a domain (when it
changes from running to shutdown, for example), the existing event
mechanism is great for avoiding polling or blocking calls, whether to a
local or remote libvirt connection URI.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 621 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvirt-users/attachments/20130409/6bb82f31/attachment.sig>


More information about the libvirt-users mailing list