Rename g_thread_try to g_thread_try_new
[platform/upstream/glib.git] / glib / gthread.c
index af27110..191f543 100644 (file)
  * GThread:
  *
  * The #GThread struct represents a running thread. This struct
- * is returned by g_thread_new() or g_thread_try(). You can obtain the
- * #GThread struct representing the current thead by calling
+ * is returned by g_thread_new() or g_thread_try_new(). You can obtain
+ * the #GThread struct representing the current thead by calling
  * g_thread_self().
  *
  * The structure is opaque -- none of its fields may be directly
  * @data: data passed to the thread
  *
  * Specifies the type of the @func functions passed to g_thread_new() or
- * g_thread_try().
+ * g_thread_try_new().
  *
  * Returns: the return value of the thread
  */
@@ -742,7 +742,7 @@ g_thread_proxy (gpointer data)
  * 16 bytes.
  *
  * If the thread can not be created the program aborts.  See
- * g_thread_try() if you want to attempt to deal with failures.
+ * g_thread_try_new() if you want to attempt to deal with failures.
  *
  * Returns: the new #GThread
  *
@@ -765,27 +765,27 @@ g_thread_new (const gchar *name,
 }
 
 /**
- * g_thread_try:
+ * g_thread_try_new:
  * @name: a name for the new thread
  * @func: a function to execute in the new thread
  * @data: an argument to supply to the new thread
- * @error: return location for error
+ * @error: return location for error, or %NULL
  *
- * This function is the same as g_thread_new() except that it allows for
- * the possibility of failure.
+ * This function is the same as g_thread_new() except that
+ * it allows for the possibility of failure.
  *
- * If a thread can not be created (due to resource limits), @error is
- * set and %NULL is returned.
+ * If a thread can not be created (due to resource limits),
+ * @error is set and %NULL is returned.
  *
  * Returns: the new #GThread, or %NULL if an error occurred
  *
  * Since: 2.32
  */
 GThread *
-g_thread_try (const gchar  *name,
-              GThreadFunc   func,
-              gpointer      data,
-              GError      **error)
+g_thread_try_new (const gchar  *name,
+                  GThreadFunc   func,
+                  gpointer      data,
+                  GError      **error)
 {
   return g_thread_new_internal (name, g_thread_proxy, func, data, 0, error);
 }
@@ -889,7 +889,8 @@ g_thread_join (GThread *thread)
  * g_thread_self:
  *
  * This functions returns the #GThread corresponding to the
- * current thread.
+ * current thread. Note that this function does not increase
+ * the reference count of the returned object.
  *
  * Returns: the #GThread representing the current thread
  */