mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-07-30 13:53:30 +02:00
thread: nuke the concept of 'joinable'
And remove the 'joinable' argument from g_thread_new() and g_thread_new_full(). Change the wording in the docs. Clarify expectations for (deprecated) g_thread_create().
This commit is contained in:
@@ -133,8 +133,8 @@ testcase (gconstpointer data)
|
||||
|
||||
for (i = 0; i < THREADS; i++)
|
||||
threads[i] = g_thread_new ("foo", thread_func,
|
||||
GINT_TO_POINTER (use_pointers),
|
||||
TRUE, NULL);
|
||||
GINT_TO_POINTER (use_pointers),
|
||||
NULL);
|
||||
|
||||
for (i = 0; i < THREADS; i++)
|
||||
g_thread_join (threads[i]);
|
||||
|
@@ -47,7 +47,7 @@ test_atomic (void)
|
||||
bucket[i] = 0;
|
||||
|
||||
for (i = 0; i < THREADS; i++)
|
||||
threads[i] = g_thread_new ("atomic", thread_func, GINT_TO_POINTER (i), TRUE, NULL);
|
||||
threads[i] = g_thread_new ("atomic", thread_func, GINT_TO_POINTER (i), NULL);
|
||||
|
||||
for (i = 0; i < THREADS; i++)
|
||||
g_thread_join (threads[i]);
|
||||
|
@@ -229,7 +229,7 @@ test_threaded (void)
|
||||
for (i = 0; i < NUM_THREADS; i++)
|
||||
{
|
||||
context_init (&contexts[i]);
|
||||
threads[i] = g_thread_new ("test", thread_func, &contexts[i], TRUE, NULL);
|
||||
threads[i] = g_thread_new ("test", thread_func, &contexts[i], NULL);
|
||||
}
|
||||
|
||||
/* dispatch tokens */
|
||||
|
@@ -41,8 +41,7 @@ multithreaded_test_run (GThreadFunc function)
|
||||
{
|
||||
GThread *thread;
|
||||
|
||||
thread = g_thread_new ("test", function,
|
||||
GINT_TO_POINTER (i), TRUE, &error);
|
||||
thread = g_thread_new ("test", function, GINT_TO_POINTER (i), &error);
|
||||
g_assert_no_error (error);
|
||||
g_ptr_array_add (threads, thread);
|
||||
}
|
||||
|
Reference in New Issue
Block a user