]> xenbits.xensource.com Git - libvirt.git/commitdiff
docs: Add callback-related info to virStream{Abort,Finish}
authorMartin Kletzander <mkletzan@redhat.com>
Tue, 20 Jun 2017 13:36:48 +0000 (15:36 +0200)
committerMartin Kletzander <mkletzan@redhat.com>
Wed, 28 Jun 2017 07:40:54 +0000 (09:40 +0200)
When one has a non-blocking stream and aborts or finishes it without
removing the callback, any event loop invocation will trigger that
callback, but it cannot be removed any more.  We cannot remove the
callback automatically from virStream{Abort,Finish} functions due to
forward-compatibility.  So let's at least document this behaviour,
because it is not easy to find out the reason for.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
src/libvirt-stream.c

index d7a8f581608fc138f691be3f21ea4af1ebe43158..c49f20264fd7d33a486986b7664792d76aa923a5 100644 (file)
@@ -1131,6 +1131,9 @@ virStreamEventRemoveCallback(virStreamPtr stream)
  * errors, so if this returns a success code the application can
  * be sure that all data has been successfully processed.
  *
+ * If the stream is non-blocking, any callback must be removed
+ * beforehand.
+ *
  * Returns 0 on success, -1 upon error
  */
 int
@@ -1170,6 +1173,9 @@ virStreamFinish(virStreamPtr stream)
  * streams this can be used to inform the driver that it
  * should stop sending data.
  *
+ * If the stream is non-blocking, any callback must be removed
+ * beforehand.
+ *
  * Returns 0 on success, -1 upon error
  */
 int