From 64acb3186250ef53d64038aae1560dcaf76753d1 Mon Sep 17 00:00:00 2001 From: Tim Janik Date: Thu, 12 Jul 2007 13:46:22 +0000 Subject: [PATCH] document major caveat of g_private_set/g_private_get, i.e. not retaining Thu Jul 12 15:45:27 2007 Tim Janik * 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 --- docs/reference/ChangeLog | 5 +++++ docs/reference/glib/tmpl/threads.sgml | 9 +++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/docs/reference/ChangeLog b/docs/reference/ChangeLog index 1a869b26..de811a19 100644 --- a/docs/reference/ChangeLog +++ b/docs/reference/ChangeLog @@ -1,3 +1,8 @@ +Thu Jul 12 15:45:27 2007 Tim Janik + + * 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 * glib/tmpl/types.sgml: corrected descriptions of gsize and gssize. diff --git a/docs/reference/glib/tmpl/threads.sgml b/docs/reference/glib/tmpl/threads.sgml index fa4392d2..6b177cd3 100644 --- a/docs/reference/glib/tmpl/threads.sgml +++ b/docs/reference/glib/tmpl/threads.sgml @@ -1506,8 +1506,12 @@ current @private_key and thread yet, this pointer will be %NULL. -This function can be used even if g_thread_init() has not yet been -called, and, in that case, will return the value of @private_key casted to #gpointer. +This function can be used even if g_thread_init() has not yet been called, and, +in that case, will return the value of @private_key casted to #gpointer. +Note however, that private data set before g_thread_init() will +not be retained after 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. @private_key: a #GPrivate. @@ -1523,6 +1527,7 @@ Sets the pointer keyed to @private_key for the current thread. 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*. +See g_private_get() for resulting caveats. @private_key: a #GPrivate. -- 2.34.1