mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-11-09 19:06:15 +01:00
Merge branch 'threadtests-performance' into 'main'
tests: Speed up threaded toggle notify test unless -m slow is passed See merge request GNOME/glib!3919
This commit is contained in:
commit
c0f5e6d217
@ -480,6 +480,7 @@ test_threaded_toggle_notify (void)
|
||||
ToggleNotifyThreadData data = { object, FALSE, 0 };
|
||||
GThread *threads[3];
|
||||
gsize i;
|
||||
const int n_iterations = g_test_thorough () ? 1000000 : 100000;
|
||||
|
||||
g_test_bug ("https://gitlab.gnome.org/GNOME/glib/issues/2394");
|
||||
g_test_summary ("Test that toggle reference notifications can be changed "
|
||||
@ -498,7 +499,7 @@ test_threaded_toggle_notify (void)
|
||||
* race to happen, so we wait for an high number of toggle changes to be met
|
||||
* so that we can be consistent on each platform.
|
||||
*/
|
||||
while (g_atomic_int_get (&data.toggles) < 1000000)
|
||||
while (g_atomic_int_get (&data.toggles) < n_iterations)
|
||||
;
|
||||
g_atomic_int_set (&data.done, TRUE);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user