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.
This commit is contained in:
Matthias Clasen 2005-05-20 17:15:37 +00:00 committed by Matthias Clasen
parent a9fc3503a1
commit 6b36180679
2 changed files with 11 additions and 0 deletions

View File

@ -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>

View File

@ -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>