mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-11-10 03:16:17 +01:00
tests: Port GObject tests from g_thread_create() to g_thread_new()
To avoid warnings about deprecated functions. Signed-off-by: Philip Withnall <pwithnall@endlessos.org> Helps: #1434
This commit is contained in:
parent
70401ae8c3
commit
ed84b8f468
@ -129,10 +129,10 @@ test_refcount_object_basics (void)
|
|||||||
for (i = 0; i < n_threads; i++) {
|
for (i = 0; i < n_threads; i++) {
|
||||||
GThread *thread;
|
GThread *thread;
|
||||||
|
|
||||||
thread = g_thread_create ((GThreadFunc) run_thread, test1, TRUE, NULL);
|
thread = g_thread_new (NULL, (GThreadFunc) run_thread, test1);
|
||||||
g_array_append_val (test_threads, thread);
|
g_array_append_val (test_threads, thread);
|
||||||
|
|
||||||
thread = g_thread_create ((GThreadFunc) run_thread, test2, TRUE, NULL);
|
thread = g_thread_new (NULL, (GThreadFunc) run_thread, test2);
|
||||||
g_array_append_val (test_threads, thread);
|
g_array_append_val (test_threads, thread);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -210,7 +210,7 @@ test_refcount_properties_1 (void)
|
|||||||
g_atomic_int_set (&stopping, FALSE);
|
g_atomic_int_set (&stopping, FALSE);
|
||||||
|
|
||||||
for (i = 0; i < N_THREADS; i++)
|
for (i = 0; i < N_THREADS; i++)
|
||||||
test_threads[i] = g_thread_create ((GThreadFunc) run_thread, test_objects[i], TRUE, NULL);
|
test_threads[i] = g_thread_new (NULL, (GThreadFunc) run_thread, test_objects[i]);
|
||||||
|
|
||||||
g_usleep (3000000);
|
g_usleep (3000000);
|
||||||
|
|
||||||
|
@ -172,7 +172,7 @@ test_refcount_properties_3 (void)
|
|||||||
for (i = 0; i < n_threads; i++) {
|
for (i = 0; i < n_threads; i++) {
|
||||||
GThread *thread;
|
GThread *thread;
|
||||||
|
|
||||||
thread = g_thread_create ((GThreadFunc) run_thread, test, TRUE, NULL);
|
thread = g_thread_new (NULL, (GThreadFunc) run_thread, test);
|
||||||
g_array_append_val (test_threads, thread);
|
g_array_append_val (test_threads, thread);
|
||||||
}
|
}
|
||||||
g_usleep (30000000);
|
g_usleep (30000000);
|
||||||
|
@ -275,10 +275,10 @@ test_refcount_signals (void)
|
|||||||
for (i = 0; i < n_threads; i++) {
|
for (i = 0; i < n_threads; i++) {
|
||||||
GThread *thread;
|
GThread *thread;
|
||||||
|
|
||||||
thread = g_thread_create ((GThreadFunc) run_thread, test1, TRUE, NULL);
|
thread = g_thread_new (NULL, (GThreadFunc) run_thread, test1);
|
||||||
g_array_append_val (test_threads, thread);
|
g_array_append_val (test_threads, thread);
|
||||||
|
|
||||||
thread = g_thread_create ((GThreadFunc) run_thread, test2, TRUE, NULL);
|
thread = g_thread_new (NULL, (GThreadFunc) run_thread, test2);
|
||||||
g_array_append_val (test_threads, thread);
|
g_array_append_val (test_threads, thread);
|
||||||
}
|
}
|
||||||
g_usleep (5000000);
|
g_usleep (5000000);
|
||||||
|
Loading…
Reference in New Issue
Block a user