mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-13 15:56:23 +01:00
document major caveat of g_private_set/g_private_get, i.e. not retaining
Thu Jul 12 15:45:27 2007 Tim Janik <timj@imendio.com> * glib/tmpl/threads.sgml: document major caveat of g_private_set/g_private_get, i.e. not retaining private data across g_thread_init. svn path=/trunk/; revision=5628
This commit is contained in:
parent
86fe2d770a
commit
64acb31862
@ -1,3 +1,8 @@
|
|||||||
|
Thu Jul 12 15:45:27 2007 Tim Janik <timj@imendio.com>
|
||||||
|
|
||||||
|
* glib/tmpl/threads.sgml: document major caveat of g_private_set/g_private_get,
|
||||||
|
i.e. not retaining private data across g_thread_init.
|
||||||
|
|
||||||
Tue Jul 10 13:11:55 2007 Tim Janik <timj@imendio.com>
|
Tue Jul 10 13:11:55 2007 Tim Janik <timj@imendio.com>
|
||||||
|
|
||||||
* glib/tmpl/types.sgml: corrected descriptions of gsize and gssize.
|
* glib/tmpl/types.sgml: corrected descriptions of gsize and gssize.
|
||||||
|
@ -1506,8 +1506,12 @@ current @private_key and thread yet, this pointer will be %NULL.
|
|||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
This function can be used even if g_thread_init() has not yet been
|
This function can be used even if g_thread_init() has not yet been called, and,
|
||||||
called, and, in that case, will return the value of @private_key casted to #gpointer.
|
in that case, will return the value of @private_key casted to #gpointer.
|
||||||
|
Note however, that private data set <emphasis>before</emphasis> g_thread_init() will
|
||||||
|
<emphasis>not</emphasis> be retained <emphasis>after</emphasis> the call. Instead, %NULL
|
||||||
|
will be returned in all threads directly after g_thread_init(), regardless of
|
||||||
|
any g_private_set() calls issued before threading system intialization.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
@private_key: a #GPrivate.
|
@private_key: a #GPrivate.
|
||||||
@ -1523,6 +1527,7 @@ Sets the pointer keyed to @private_key for the current thread.
|
|||||||
<para>
|
<para>
|
||||||
This function can be used even if g_thread_init() has not yet been
|
This function can be used even if g_thread_init() has not yet been
|
||||||
called, and, in that case, will set @private_key to @data casted to #GPrivate*.
|
called, and, in that case, will set @private_key to @data casted to #GPrivate*.
|
||||||
|
See g_private_get() for resulting caveats.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
@private_key: a #GPrivate.
|
@private_key: a #GPrivate.
|
||||||
|
Loading…
Reference in New Issue
Block a user