summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2005-05-20 17:15:37 +0000
committerMatthias Clasen <matthiasc@src.gnome.org>2005-05-20 17:15:37 +0000
commit6b361806794398721a3c317c2a49997c36f8e6df (patch)
treeedaa11b5cd883e2e51920000583be98b5b5d496e /docs
parenta9fc3503a1440a95c95e3f3a6822986fc873613b (diff)
Add a paragraph about thread safety of GLib data structures.
2005-05-20 Matthias Clasen <mclasen@redhat.com> * glib/tmpl/threads.sgml: Add a paragraph about thread safety of GLib data structures.
Diffstat (limited to 'docs')
-rw-r--r--docs/reference/ChangeLog3
-rw-r--r--docs/reference/glib/tmpl/threads.sgml8
2 files changed, 11 insertions, 0 deletions
diff --git a/docs/reference/ChangeLog b/docs/reference/ChangeLog
index 3e2105004..0c9df5f73 100644
--- a/docs/reference/ChangeLog
+++ b/docs/reference/ChangeLog
@@ -1,5 +1,8 @@
2005-05-20 Matthias Clasen <mclasen@redhat.com>
+ * glib/tmpl/threads.sgml: Add a paragraph about thread
+ safety of GLib data structures.
+
* glib/compiling.sgml: Update an example from 1.3 to 2.x
2005-05-13 Matthias Clasen <mclasen@redhat.com>
diff --git a/docs/reference/glib/tmpl/threads.sgml b/docs/reference/glib/tmpl/threads.sgml
index e84bb98c5..80f50cc95 100644
--- a/docs/reference/glib/tmpl/threads.sgml
+++ b/docs/reference/glib/tmpl/threads.sgml
@@ -32,6 +32,14 @@ for thread-private data, that every thread has a private instance of
primitives to portably create and manage threads (#GThread).
</para>
+<para>
+You must call g_thread_init() before executing any other GLib functions
+in a threaded GLib program. After that, GLib is completely thread safe
+(all global data is automatically locked). But individual data structure
+instances are not automatically locked for performance reasons. So e.g.
+you must coordinate accesses to the same #GHashTable from multiple threads.
+</para>
+
<!-- ##### SECTION See_Also ##### -->
<para>
<variablelist>