[glib] Rename g_thread_try to g_thread_try_new
- From: Ryan Lortie <ryanl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib] Rename g_thread_try to g_thread_try_new
- Date: Sat, 15 Oct 2011 13:52:09 +0000 (UTC)
commit e75e9c30446157b52013644fdc5fd406733027b9
Author: Ryan Lortie <desrt desrt ca>
Date: Sat Oct 15 09:48:10 2011 -0400
Rename g_thread_try to g_thread_try_new
docs/reference/glib/glib-sections.txt | 2 +-
glib/glib.symbols | 2 +-
glib/gthread.c | 18 +++++++++---------
glib/gthread.h | 2 +-
glib/gthreadpool.c | 2 +-
glib/tests/thread.c | 4 ++--
6 files changed, 15 insertions(+), 15 deletions(-)
---
diff --git a/docs/reference/glib/glib-sections.txt b/docs/reference/glib/glib-sections.txt
index 313b73b..3015ffa 100644
--- a/docs/reference/glib/glib-sections.txt
+++ b/docs/reference/glib/glib-sections.txt
@@ -591,7 +591,7 @@ GThreadError
GThread
GThreadFunc
g_thread_new
-g_thread_try
+g_thread_try_new
g_thread_ref
g_thread_unref
g_thread_join
diff --git a/glib/glib.symbols b/glib/glib.symbols
index 62a4655..95c705d 100644
--- a/glib/glib.symbols
+++ b/glib/glib.symbols
@@ -1102,7 +1102,7 @@ g_thread_new
g_thread_ref
g_thread_self
g_thread_set_priority
-g_thread_try
+g_thread_try_new
g_thread_use_default_impl
g_thread_unref
g_thread_yield
diff --git a/glib/gthread.c b/glib/gthread.c
index b454d87..191f543 100644
--- a/glib/gthread.c
+++ b/glib/gthread.c
@@ -422,8 +422,8 @@
* 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
@@ -435,7 +435,7 @@
* @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,7 +765,7 @@ 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
@@ -782,10 +782,10 @@ g_thread_new (const gchar *name,
* 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);
}
diff --git a/glib/gthread.h b/glib/gthread.h
index c3b0f0c..90008d6 100644
--- a/glib/gthread.h
+++ b/glib/gthread.h
@@ -142,7 +142,7 @@ void g_thread_unref (GThread *thread);
GThread * g_thread_new (const gchar *name,
GThreadFunc func,
gpointer data);
-GThread * g_thread_try (const gchar *name,
+GThread * g_thread_try_new (const gchar *name,
GThreadFunc func,
gpointer data,
GError **error);
diff --git a/glib/gthreadpool.c b/glib/gthreadpool.c
index a07628f..9e3bac4 100644
--- a/glib/gthreadpool.c
+++ b/glib/gthreadpool.c
@@ -414,7 +414,7 @@ g_thread_pool_start_thread (GRealThreadPool *pool,
GThread *thread;
/* No thread was found, we have to start a new one */
- thread = g_thread_try ("pool", g_thread_pool_thread_proxy, pool, error);
+ thread = g_thread_try_new ("pool", g_thread_pool_thread_proxy, pool, error);
if (thread == NULL)
return FALSE;
diff --git a/glib/tests/thread.c b/glib/tests/thread.c
index 488f961..2c7c741 100644
--- a/glib/tests/thread.c
+++ b/glib/tests/thread.c
@@ -50,7 +50,7 @@ test_thread1 (void)
GThread *thread;
GError *error = NULL;
- thread = g_thread_try ("test", thread1_func, NULL, &error);
+ thread = g_thread_try_new ("test", thread1_func, NULL, &error);
g_assert_no_error (error);
result = g_thread_join (thread);
@@ -135,7 +135,7 @@ test_thread4 (void)
g_error ("prlimit failed: %s\n", g_strerror (ret));
error = NULL;
- thread = g_thread_try ("a", thread1_func, NULL, &error);
+ thread = g_thread_try_new ("a", thread1_func, NULL, &error);
g_assert (thread == NULL);
g_assert_error (error, G_THREAD_ERROR, G_THREAD_ERROR_AGAIN);
g_error_free (error);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]