summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDominik Perpeet <dperpeet@redhat.com>2015-09-25 10:54:21 +0200
committerCole Robinson <crobinso@redhat.com>2015-10-15 19:53:49 -0400
commit4ee196bf308f2a955d72e2bc1b7720ccc8df6aa3 (patch)
tree4428908cd2870e30e3cef8ffe246f6d303460d2e /src
parent404e42d3c69c517cfccc53164f00fa6c9ade21d3 (diff)
downloadlibvirt-4ee196bf308f2a955d72e2bc1b7720ccc8df6aa3.tar.gz
docs: event impl. registration before hypervisor connection
Event implementations need to be registered before a connection to the Hypervisor is opened, otherwise event handling can be impaired (e.g. delayed messages). This fact is referenced in an e-mail [1], but should also be noted in the documentation of the registration functions. [1] https://www.redhat.com/archives/libvirt-users/2014-April/msg00011.html (cherry picked from commit 9bf1cef7371b119cf1ad1e83daaa9cd0da893352)
Diffstat (limited to 'src')
-rw-r--r--src/util/virevent.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/util/virevent.c b/src/util/virevent.c
index 54b6396367..e0fd35e416 100644
--- a/src/util/virevent.c
+++ b/src/util/virevent.c
@@ -204,6 +204,9 @@ virEventRemoveTimeout(int timer)
* to integrate with the libglib2 event loop, or libevent
* or the QT event loop.
*
+ * For proper event handling, it is important that the event implementation
+ * is registered before a connection to the Hypervisor is opened.
+ *
* Use of the virEventAddHandle() and similar APIs require that the
* corresponding handler is registered. Use of the
* virConnectDomainEventRegisterAny() and similar APIs requires that
@@ -247,6 +250,9 @@ void virEventRegisterImpl(virEventAddHandleFunc addHandle,
* not have a need to integrate with an external event
* loop impl.
*
+ * For proper event handling, it is important that the event implementation
+ * is registered before a connection to the Hypervisor is opened.
+ *
* Once registered, the application has to invoke virEventRunDefaultImpl() in
* a loop to process events. Failure to do so may result in connections being
* closed unexpectedly as a result of keepalive timeout. The default