Merge branch 'mutex-tests-more' into 'main'

glib/tests/[rec-]mutex: Allow each thread to work

See merge request GNOME/glib!3389
This commit is contained in:
Philip Withnall 2023-04-24 10:25:05 +00:00
commit cba49eb6a1
2 changed files with 2 additions and 2 deletions

View File

@ -195,7 +195,7 @@ test_mutex_perf (gconstpointer data)
gint x = -1;
guint i;
count_to = g_test_perf () ? 100000000 : 1;
count_to = g_test_perf () ? 100000000 : n_threads + 1;
g_assert (n_threads <= G_N_ELEMENTS (threads));

View File

@ -204,7 +204,7 @@ test_mutex_perf (gconstpointer data)
n_threads = c / 256;
depth = c % 256;
count_to = g_test_perf () ? 100000000 : 1;
count_to = g_test_perf () ? 100000000 : n_threads + 1;
for (i = 0; i < n_threads - 1; i++)
threads[i] = g_thread_new ("test", addition_thread, &x);