Merge branch '602-introspect-thread' into 'master'

gthread: Add introspection annotations

Closes #602

See merge request GNOME/glib!1499
This commit is contained in:
Sebastian Dröge 2020-05-19 15:15:00 +00:00
commit e4c3af9d4e

View File

@ -739,7 +739,7 @@ void
* *
* Increase the reference count on @thread. * Increase the reference count on @thread.
* *
* Returns: a new reference to @thread * Returns: (transfer full): a new reference to @thread
* *
* Since: 2.32 * Since: 2.32
*/ */
@ -755,7 +755,7 @@ g_thread_ref (GThread *thread)
/** /**
* g_thread_unref: * g_thread_unref:
* @thread: a #GThread * @thread: (transfer full): a #GThread
* *
* Decrease the reference count on @thread, possibly freeing all * Decrease the reference count on @thread, possibly freeing all
* resources associated with it. * resources associated with it.
@ -818,8 +818,8 @@ g_thread_n_created (void)
/** /**
* g_thread_new: * g_thread_new:
* @name: (nullable): an (optional) name for the new thread * @name: (nullable): an (optional) name for the new thread
* @func: a function to execute in the new thread * @func: (closure data) (scope async): a function to execute in the new thread
* @data: an argument to supply to the new thread * @data: (nullable): an argument to supply to the new thread
* *
* This function creates a new thread. The new thread starts by invoking * This function creates a new thread. The new thread starts by invoking
* @func with the argument data. The thread will run until @func returns * @func with the argument data. The thread will run until @func returns
@ -849,7 +849,7 @@ g_thread_n_created (void)
* Starting with GLib 2.64 the behaviour is now consistent between Windows and * Starting with GLib 2.64 the behaviour is now consistent between Windows and
* POSIX and all threads inherit their parent thread's priority. * POSIX and all threads inherit their parent thread's priority.
* *
* Returns: the new #GThread * Returns: (transfer full): the new #GThread
* *
* Since: 2.32 * Since: 2.32
*/ */
@ -872,8 +872,8 @@ g_thread_new (const gchar *name,
/** /**
* g_thread_try_new: * g_thread_try_new:
* @name: (nullable): an (optional) name for the new thread * @name: (nullable): an (optional) name for the new thread
* @func: a function to execute in the new thread * @func: (closure data) (scope async): a function to execute in the new thread
* @data: an argument to supply to the new thread * @data: (nullable): an argument to supply to the new thread
* @error: return location for error, or %NULL * @error: return location for error, or %NULL
* *
* This function is the same as g_thread_new() except that * This function is the same as g_thread_new() except that
@ -882,7 +882,7 @@ g_thread_new (const gchar *name,
* If a thread can not be created (due to resource limits), * If a thread can not be created (due to resource limits),
* @error is set and %NULL is returned. * @error is set and %NULL is returned.
* *
* Returns: the new #GThread, or %NULL if an error occurred * Returns: (transfer full): the new #GThread, or %NULL if an error occurred
* *
* Since: 2.32 * Since: 2.32
*/ */
@ -953,7 +953,7 @@ g_thread_exit (gpointer retval)
/** /**
* g_thread_join: * g_thread_join:
* @thread: a #GThread * @thread: (transfer full): a #GThread
* *
* Waits until @thread finishes, i.e. the function @func, as * Waits until @thread finishes, i.e. the function @func, as
* given to g_thread_new(), returns or g_thread_exit() is called. * given to g_thread_new(), returns or g_thread_exit() is called.
@ -972,7 +972,7 @@ g_thread_exit (gpointer retval)
* to be freed. Use g_thread_ref() to obtain an extra reference if you * to be freed. Use g_thread_ref() to obtain an extra reference if you
* want to keep the GThread alive beyond the g_thread_join() call. * want to keep the GThread alive beyond the g_thread_join() call.
* *
* Returns: the return value of the thread * Returns: (transfer full): the return value of the thread
*/ */
gpointer gpointer
g_thread_join (GThread *thread) g_thread_join (GThread *thread)
@ -1008,7 +1008,7 @@ g_thread_join (GThread *thread)
* (i.e. comparisons) but you must not use GLib functions (such * (i.e. comparisons) but you must not use GLib functions (such
* as g_thread_join()) on these threads. * as g_thread_join()) on these threads.
* *
* Returns: the #GThread representing the current thread * Returns: (transfer none): the #GThread representing the current thread
*/ */
GThread* GThread*
g_thread_self (void) g_thread_self (void)