mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-03-16 12:45:13 +01:00
GThread: more doc updates
This commit is contained in:
parent
4e44e23517
commit
e34861da08
@ -620,41 +620,29 @@ G_LOCK_DEFINE_STATIC (g_thread);
|
|||||||
/**
|
/**
|
||||||
* g_thread_init:
|
* g_thread_init:
|
||||||
* @vtable: a function table of type #GThreadFunctions, that provides
|
* @vtable: a function table of type #GThreadFunctions, that provides
|
||||||
* the entry points to the thread system to be used.
|
* the entry points to the thread system to be used. Since 2.32,
|
||||||
|
* this parameter is ignored and should always be %NULL
|
||||||
*
|
*
|
||||||
* If you use GLib from more than one thread, you must initialize the
|
* If you use GLib from more than one thread, you must initialize the
|
||||||
* thread system by calling g_thread_init(). Most of the time you will
|
* thread system by calling g_thread_init().
|
||||||
* only have to call <literal>g_thread_init (NULL)</literal>.
|
|
||||||
*
|
*
|
||||||
* <note><para>Do not call g_thread_init() with a non-%NULL parameter unless
|
* Since version 2.24, calling g_thread_init() multiple times is allowed,
|
||||||
* you really know what you are doing.</para></note>
|
* but nothing happens except for the first call.
|
||||||
*
|
*
|
||||||
* <note><para>g_thread_init() must not be called directly or indirectly as a
|
* Since version 2.32, GLib does not support custom thread implementations
|
||||||
* callback from GLib. Also no mutexes may be currently locked while
|
* anymore and the @vtable parameter is ignored and you should pass %NULL.
|
||||||
|
*
|
||||||
|
* <note><para>g_thread_init() must not be called directly or indirectly
|
||||||
|
* in a callback from GLib. Also no mutexes may be currently locked while
|
||||||
* calling g_thread_init().</para></note>
|
* calling g_thread_init().</para></note>
|
||||||
*
|
*
|
||||||
* <note><para>g_thread_init() changes the way in which #GTimer measures
|
* <note><para>To use g_thread_init() in your program, you have to link
|
||||||
* elapsed time. As a consequence, timers that are running while
|
* with the libraries that the command <command>pkg-config --libs
|
||||||
* g_thread_init() is called may report unreliable times.</para></note>
|
|
||||||
*
|
|
||||||
* Calling g_thread_init() multiple times is allowed (since version
|
|
||||||
* 2.24), but nothing happens except for the first call. If the
|
|
||||||
* argument is non-%NULL on such a call a warning will be printed, but
|
|
||||||
* otherwise the argument is ignored.
|
|
||||||
*
|
|
||||||
* If no thread system is available and @vtable is %NULL or if not all
|
|
||||||
* elements of @vtable are non-%NULL, then g_thread_init() will abort.
|
|
||||||
*
|
|
||||||
* <note><para>To use g_thread_init() in your program, you have to link with
|
|
||||||
* the libraries that the command <command>pkg-config --libs
|
|
||||||
* gthread-2.0</command> outputs. This is not the case for all the
|
* gthread-2.0</command> outputs. This is not the case for all the
|
||||||
* other thread related functions of GLib. Those can be used without
|
* other thread-related functions of GLib. Those can be used without
|
||||||
* having to link with the thread libraries.</para></note>
|
* having to link with the thread libraries.</para></note>
|
||||||
**/
|
|
||||||
|
|
||||||
/* This must be called only once, before any threads are created.
|
|
||||||
* It will only be called from g_thread_init() in -lgthread.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
void
|
void
|
||||||
g_thread_init_glib (void)
|
g_thread_init_glib (void)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user