mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-02-26 12:12:10 +01:00
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:
parent
a9fc3503a1
commit
6b36180679
@ -1,5 +1,8 @@
|
|||||||
2005-05-20 Matthias Clasen <mclasen@redhat.com>
|
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
|
* glib/compiling.sgml: Update an example from 1.3 to 2.x
|
||||||
|
|
||||||
2005-05-13 Matthias Clasen <mclasen@redhat.com>
|
2005-05-13 Matthias Clasen <mclasen@redhat.com>
|
||||||
|
@ -32,6 +32,14 @@ for thread-private data, that every thread has a private instance of
|
|||||||
primitives to portably create and manage threads (#GThread).
|
primitives to portably create and manage threads (#GThread).
|
||||||
</para>
|
</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 ##### -->
|
<!-- ##### SECTION See_Also ##### -->
|
||||||
<para>
|
<para>
|
||||||
<variablelist>
|
<variablelist>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user