arvind viswanathan
2013-Apr-08 22:49 UTC
[libvirt-users] can remote libvirt applications make non-blocking API calls
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. thanks Arvind -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://listman.redhat.com/archives/libvirt-users/attachments/20130408/df2b5eff/attachment.htm>
Eric Blake
2013-Apr-09 22:02 UTC
[libvirt-users] can remote libvirt applications make non-blocking API calls
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>