Docs: Add section on using multiple threads.
authorRichard W.M. Jones <rjones@redhat.com>
Fri, 13 Nov 2009 14:47:32 +0000 (14:47 +0000)
committerRichard W.M. Jones <rjones@redhat.com>
Fri, 13 Nov 2009 14:50:39 +0000 (14:50 +0000)
This section was missing from the previous documentation.

guestfs.pod

index 2ebcc09..bfd472e 100644 (file)
@@ -935,6 +935,15 @@ sort of connection control, when the daemon launches it sends an
 initial word (C<GUESTFS_LAUNCH_FLAG>) which indicates that the guest
 and daemon is alive.  This is what C<guestfs_launch> waits for.
 
 initial word (C<GUESTFS_LAUNCH_FLAG>) which indicates that the guest
 and daemon is alive.  This is what C<guestfs_launch> waits for.
 
+=head1 MULTIPLE HANDLES AND MULTIPLE THREADS
+
+All high-level libguestfs actions are synchronous.  If you want
+to use libguestfs asynchronously then you must create a thread.
+
+Only use the handle from a single thread.  Either use the handle
+exclusively from one thread, or provide your own mutex so that two
+threads cannot issue calls on the same handle at the same time.
+
 =head1 QEMU WRAPPERS
 
 If you want to compile your own qemu, run qemu from a non-standard
 =head1 QEMU WRAPPERS
 
 If you want to compile your own qemu, run qemu from a non-standard