gtestdbus: Add a note about thread safety to the documentation
authorPhilip Withnall <philip.withnall@collabora.co.uk>
Tue, 3 Dec 2013 08:27:05 +0000 (08:27 +0000)
committerPhilip Withnall <philip.withnall@collabora.co.uk>
Fri, 6 Dec 2013 09:41:56 +0000 (09:41 +0000)
https://bugzilla.gnome.org/show_bug.cgi?id=712148

gio/gtestdbus.c

index ea19683..a7410ac 100644 (file)
@@ -323,6 +323,12 @@ _g_test_watcher_remove_pid (GPid pid)
  * A helper class for testing code which uses D-Bus without touching the user's
  * session bus.
  *
+ * Note that #GTestDBus modifies the user’s environment, calling setenv(). This
+ * is not thread-safe, so all #GTestDBus calls should be completed before
+ * threads are spawned, or should have appropriate locking to ensure no access
+ * conflicts to environment variables shared between #GTestDBus and other
+ * threads.
+ *
  * <refsect2 id="gio-D-Bus-Test-Scaffolding">
  *   <title>Creating unit tests using GTestDBus</title>
  *   <para>