mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-06-22 04:04:51 +02:00
Add an exception: g_mem_set_vtable() may be called before g_thread_init().
2008-08-15 Tor Lillqvist <tml@novell.com> * glib/tmpl/threads.sgml: Add an exception: g_mem_set_vtable() may be called before g_thread_init(). svn path=/trunk/; revision=7361
This commit is contained in:
parent
8f1f0ffe78
commit
2c73140cc1
@ -1,3 +1,8 @@
|
|||||||
|
2008-08-15 Tor Lillqvist <tml@novell.com>
|
||||||
|
|
||||||
|
* glib/tmpl/threads.sgml: Add an exception: g_mem_set_vtable() may
|
||||||
|
be called before g_thread_init().
|
||||||
|
|
||||||
2008-08-15 Tor Lillqvist <tml@novell.com>
|
2008-08-15 Tor Lillqvist <tml@novell.com>
|
||||||
|
|
||||||
* glib/tmpl/threads.sgml: Warn about the consequences of not
|
* glib/tmpl/threads.sgml: Warn about the consequences of not
|
||||||
|
@ -34,14 +34,15 @@ primitives to portably create and manage threads (#GThread).
|
|||||||
|
|
||||||
<para>
|
<para>
|
||||||
You must call g_thread_init() before executing any other GLib
|
You must call g_thread_init() before executing any other GLib
|
||||||
functions in a GLib program if g_thread_init() will be called at
|
functions (except g_mem_set_vtable()) in a GLib program if
|
||||||
all. This is a requirement even if no threads are in fact ever created
|
g_thread_init() will be called at all. This is a requirement even if
|
||||||
by the process. It is enough that g_thread_init() is called. If other
|
no threads are in fact ever created by the process. It is enough that
|
||||||
GLib functions have been called before that, the behaviour of the
|
g_thread_init() is called. If other GLib functions have been called
|
||||||
program is undefined.
|
before that, the behaviour of the program is undefined. An exception
|
||||||
|
is g_mem_set_vtable() which may be called before g_thread_init().
|
||||||
|
|
||||||
Failing this requirement leads easily to hangs or crashes, apparently
|
Failing this requirement can lead to hangs or crashes, apparently more
|
||||||
more easily on Windows than on Linux, for example.
|
easily on Windows than on Linux, for example.
|
||||||
|
|
||||||
Please note that if you call functions in some GLib-using library, in
|
Please note that if you call functions in some GLib-using library, in
|
||||||
particular those above the GTK+ stack, that library might well call
|
particular those above the GTK+ stack, that library might well call
|
||||||
|
Loading…
x
Reference in New Issue
Block a user